ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Kanban control
  • Default events
  • Events supported by WINDEV and WINDEV Mobile
  • Events supported in WEBDEV
  • Optional events
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Default events
WINDEVAndroidiPhone/iPad

Events supported by WINDEV and WINDEV Mobile

The following events appear by default in the WINDEV and WINDEV Mobile code editor:
EventRuntime condition
InitializationExecuted when the window is opened. *
Start moving a cardExecuted when a card is selected to be moved in a Kanban list or Kanban control.
This event receives a variable of type kbCard as parameter, which allows getting and handling the card being moved.
Move a cardExecuted when a card is moved in a Kanban list or Kanban control. This event is executed from the moment the user starts to move the card until it is released. It is triggered when the user presses and holds the left mouse button to move the card.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the card being moved,
  • a Kanban List control, which corresponds to the source Kanban list.
  • a variable of type Integer, which corresponds to the index / initial position of the card.
If this event returns False, the move is not authorized..
Release a cardExecuted when the user releases the left mouse button.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the card being moved,
  • a Kanban List control, which corresponds to the target Kanban list.
  • a variable of type Integer, which corresponds to the index / target position of the card.
If this event returns False, the move is cancelled..
Remark: If the field is a file-based or variable-based Kanban field, the value returned by the event is ignored because the data source has already been modified at the time of its call..
Delete a cardExecuted when the user deletes a card:
  • the user selects the card. The "Delete" button appears at the bottom of the list.
  • the user moves the card to the "Delete" button.
  • when the card is released on the "Delete" button, the "Delete a card" code is executed.
This event receives a variable of type kbCard as parameter.
If this event returns:
  • True, the card is deleted,
  • False, the card is kept.
This event is not executed if the card is deleted programmatically.
Remark: If the control is bound to a data source, the deletion is automatic.
Add a card (via the Add button)Executed each time the user adds a card in the control: The user clicks the "+" button to add the card, then enters the title. The code is executed when the user confirms the entry.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the new card.
  • a Kanban List control, which corresponds to the list in which the card is added.
If this event returns:
  • True, the card is added to the Kanban control,
  • False, the card is not added.
This event is not executed if the card is added programmatically.
Remark: If the control is bound to a data source, the addition is automatic.
View details of a cardThis event is executed when the details of a card are displayed.
This event receives a variable of type kbCard as parameter, which corresponds to the card being handled.

(*) By default, the "Initialization" event of each control is executed according to the order in which the controls were created in the window. To change this order of execution:
  1. On the "Window" tab, in the "Order" group, click "Initialization".
  2. In the window that appears, use the arrows on the right to change the order in which the controls are initialized.
WEBDEV - Server codeWEBDEV - Browser code

Events supported in WEBDEV

The following events appear by default in the WEBDEV code editor:
EventRuntime condition
InitializationExecuted when the page is opened. *
Start moving a cardExecuted when a card is selected to be moved in a Kanban list or Kanban control.
This event receives a variable of type kbCard as parameter, which allows getting and handling the card being moved.
Move a card (Browser code)Executed when a card is moved in a Kanban list or Kanban control. This event is executed from the moment the user starts to move the card until it is released. It is triggered when the user presses and holds the left mouse button to move the card.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the card being moved,
  • a Kanban List control, which corresponds to the source Kanban list.
  • a variable of type Integer, which corresponds to the index / initial position of the card.
Release a card (Browser code)Executed when the user releases the left mouse button.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the card being moved,
  • a Kanban List control, which corresponds to the target Kanban list.
  • a variable of type Integer, which corresponds to the index / target position of the card.
Release a card (Server code)Executed when the user releases the left mouse button.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the card being moved,
  • a Kanban List control, which corresponds to the target Kanban list.
  • a variable of type Integer, which corresponds to the index / target position of the card.
Delete a card (Server code)Executed when the user deletes a card:
  • the user selects the card. The "Delete" button appears at the bottom of the list.
  • the user moves the card to the "Delete" button.
  • when the card is released on the "Delete" button, the "Delete a card" code is executed.
This event receives a variable of type kbCard as parameter.
If this event returns:
  • True, the card is deleted,
  • False, the card is kept.
This event is not executed if the card is deleted programmatically.
Remark: If the control is bound to a data source, the deletion is automatic.
Add a card (via the Add button) (Server code)Executed each time the user adds a card in the control: The user clicks the "+" button to add the card, then enters the title. The code is executed when the user confirms the entry.
This event receives as parameter:
  • a variable of type kbCard, which corresponds to the new card.
  • a Kanban List control, which corresponds to the list in which the card is added.
If this event returns:
  • True, the card is added to the Kanban control,
  • False, the card is not added.
This event is not executed if the card is added programmatically.
Remark: If the control is bound to a data source, the addition is automatic.
View details of a card (Server code)This event is executed when the details of a card are displayed.
This event receives a variable of type kbCard as parameter, which corresponds to the card being handled.
View details of a card (Browser code)This event is executed when the details of a card are displayed.
This event receives a variable of type kbCard as parameter, which corresponds to the card being handled.

Remark: Only the browser codes are available in a static page.
Optional events
Several optional events can be added. To add an optional event:
  1. Select the desired control.
  2. Display the code window of this control (F2 key).
  3. Click the link "Add other events to xxx" at the bottom of the window code, after the last event.
  4. All the optional events available for the control are displayed.
  5. Check the optional event to add and validate.
    Remark: You can select several optional events.
  6. The selected optional event is automatically added to the events managed by the control.
To disable an optional event, simply perform the same operations to display the list of optional events. Then simply uncheck the optional events to delete.
Remark: If the disabled code contains WLanguage code, this code is automatically deleted.
For example, you can use the following events:
  • the mouse hover over the control,
  • left mouse button down, up, double click,
  • right mouse button down, up, double click,
  • the mouse wheel, etc.
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/22/2024

Send a report | Local help