We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Get Primary Key of Selected Card

Hello,

First, let me say I love Syncfusion!  
I am having trouble retrieving the primary key of a card after selecting it.  So far, I have mapped the "primaryKey" field setting to the primary key in the datasource.  I also analyzed the "cardClick" and "cardSelect" events, but I'm not seeing the data being passed anywhere in the "args" parameter.  
Is there a way I can get the primary key of the card in javascript after I select the card?

Thank you!

3 Replies

BS Buvana Sathasivam Syncfusion Team March 27, 2017 09:56 AM UTC

Hi Tim Soderstrom, 

Thanks for using Syncfusion product. 

We had prepared Kanban sample with “Get primary key of the Selected Card”.  If you are select the card, the alert box was shown with primary key value of the selected card.  Please refer the below code and JS playground. 

         
        $("#Kanban").ejKanban({ 
              cardSelect: "cardSelect",   // Card select event 
        }); 
 
 
        function cardSelect(args){        // Call when card is select 
 
             var primaryKeyValue = args.data[0][args.model.fields.primaryKey]; // Get primary key value of selected card 
 
            alert("Primay Key Value of Selected Card: " + primaryKeyValue );  
        } 


Please let us know if you have any queries. 

Regards, 
Buvana S. 
 



TS tsoder March 27, 2017 07:12 PM UTC

That worked!  Thank you for your help.


BS Buvana Sathasivam Syncfusion Team March 28, 2017 07:27 AM UTC

Hi Tim Soderstrom,  

Thanks for your update.  Let us know if you have any queries, we would be happy to assist you. 

Regards, 
Buvana S. 


Loader.
Live Chat Icon For mobile
Up arrow icon