HowTo get eventArg-Data

Please provide a very basic example of how to read out the card ID of a clicked card (CardClick)
Please provide a very basic example of how to read out the card ID, the column target-keyfield and the swimlane target-keyfield of a dragged card (DragStop)

My UseCase is that I need to allow custom sorting and therefore I need to get back the new position & swimlane for a dragged card.

I could not solve to:

- allow custom sorting (it is stuck to the array from dataSource)
- no idea how to get the dragEvents

1 Reply 1 reply marked as answer

HB Hareesh Balasubramanian Syncfusion Team October 23, 2020 04:00 PM UTC

Hi Jörg, 

Greetings from Syncfusion Support..! 

We have validated your both the queries at our end and we have prepared a sample which can be viewed from the following link. 


Q1: Please provide a very basic example of how to read out the card ID of a clicked card (CardClick) 

This query can be achieved using cradClick event, kindly refer to the below code snippet and the same can be viewed in the above sample. 

  cardClick: function(args) { 
    console.log(args.data); 
  }, 

Q2: Please provide a very basic example of how to read out the card ID, the column target-keyfield and the swimlane target-keyfield of a dragged card (DragStop) 

This query can be achieved using the dragStop event of the Kanban component, kindly refer to the below code snippets  and the same can be viewed in the above sample. 

  dragStop: function(args) { 
    console.log(args.data[0]); 
  } 

Kindly try the above solution and get back to us if you need any further assistance. 

Regards, 
Hareesh 


Marked as answer
Loader.
Up arrow icon