EJ2 Kanban: Access Column Index at dragStop Event

Dear support,

I have Kanban with three column: Engage, Accepted, Qualified. The scenario is: I move a card from one column to another column, let say: I drag card from "Engage" column and then drop it at "Qualified". At dropStop event, I have code to execute custom API that need dropped column info such as index or name:


So in my scenario, I need "Qualified" column info. But I can not found it at dropStop event. How to know dropped column info/properties like name, index etc at dropStop event?

note: dropIndex always return zero.

Thank you in advance.

Best regards,

Ismail


3 Replies 1 reply marked as answer

GK Gunasekar Kuppusamy Syncfusion Team September 25, 2021 05:26 AM UTC

Hi ISMAIL, 
  
Greetings from Syncfusion support. 
  
We have validated your reported query "How to know dropped column info/properties like name, index etc at dropStop event?" 
  
You can get the dropped card column details in the dropEvent arguments. The args.Data contains the KeyField value of the Dropped card column and using this we can get the column index. 
  
We have prepared a sample for your reference, 
  
Code Snippets: 
dragStop: function (e) { 
  alert(e.data[0].Status); // Column Name 
  for (var i = 0; i < this.columns.length; i++) { 
    if (e.data[0].Status === this.columns[i].keyField) { 
      alert(i)//Column Index 
    } 
  } 
}, 
  
Samplehttps://stackblitz.com/edit/k6k1ve?file=index.ts

Please check the sample and let us know if the sample meets your requirements. 
  
Regards, 
Gunasekar 


Marked as answer

IH ISMAIL HAMZAH replied to Gunasekar Kuppusamy September 25, 2021 09:05 AM UTC

Hi Gunasekar,


Thank you for your update info. Your provided solution solve my issue nicely:



Thank you for your help and kind support.


Best regards,

Ismail



GK Gunasekar Kuppusamy Syncfusion Team September 27, 2021 11:48 AM UTC

Hi ISMAI,

Thanks for the update. 

 
We are glad that the provided solution resolved the issue. Please let us know if you need further assistance.  
  
Regards,  
Gunasekar 


Loader.
Up arrow icon