Events

23 Sep 20202 minutes to read

ItemTapped

ItemTapped event is triggered when you tap any card. The argument contains the following information:

  • Column: Gets the column of a card.
  • Data: Gets the underlying model of a card.
  • Index: Gets the index of a card in a column.
  • ViewCell: Gets the tapped view cell.

DragStart

DragStart event is triggered when you start to drag a card. The argument contains the following information:

  • Cancel: Cancels the drag action.
  • Data: Gets the underlying model of a card.
  • KeepItem: Determines whether to keep the dragged card in the source location until it is dropped in a new location. When it is true, the preview of the card will be created for dragging.
  • SourceColumn: Gets the source column of a card.
  • SourceIndex: Gets the index of the card in a source column.

DragEnd

DragEnd event is triggered whenever a card is dropped or a dragging action is canceled. The argument contains the following information:

  • Cancel: Cancels the drag action.
  • Data: Gets the underlying model of a card.
  • SourceColumn: Gets the source column of a card.
  • SourceIndex: Gets the index of the card in a source column.
  • TargetCategory: Gets the category of a column where the card is going to be dropped.
  • TargetColumn: Gets the current column, which is the drop target for a card.
  • TargetIndex: Gets the index of the card in a target column.

DragEnter

DragEnter event is triggered when a card enters into a column when dragging. The argument contains the following information:

  • Cancel: Cancels the drag action.
  • Data: Gets the underlying model of a card.
  • IsAboveMaximumLimit: Determines whether the total cards count of the target column should be above the maximum limit if you drop the card in target column. You can define the maximum limit of the cards using the KanbanColumn.MaximumLimit property.
  • SourceColumn: Gets the source column of a card.
  • SourceIndex: Gets the index of the card in a source column.
  • TargetColumn: Gets the column upon which the card enters.
  • TargetIndex: Gets the index of the card in a target column.

DragLeave

DragLeave event is triggered when a card leaves a column when dragging. The argument contains the following information:

  • Data: Gets the underlying model of a card.
  • IsBelowMinimumLimit: Determines whether the total cards count of the target column should be below the minimum limit if you remove the card from target column. You can define the minimum limit of the cards using the KanbanColumn.MinimumLimit property.
  • SourceColumn: Gets the source column of a card.
  • SourceIndex: Gets the index of the card in a source column.
  • TargetColumn: Gets the column from which the card leaves.

DragOver

DragOver event is triggered when a card is dragged to a new index within a column. The argument contains the following information:

  • Cancel: Cancels the drag action.
  • Data: Gets the underlying model of a card.
  • SourceColumn: Gets the source column of a card.
  • SourceIndex: Gets the index of the card in source column.
  • TargetColumn: Gets the current column, which is the drop target for a card.
  • TargetIndex: Gets a new index of a card in target column.

ColumnsGenerated

ColumnsGenerated event will be fired after the columns are generated automatically. You can access the auto-generated columns using the SfKanban.ActualColumns property.