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

Edit a card

hi,

how I can have the selected card to update his data with the function updateCard ?

1 Reply

SK Sarath Kumar P Syncfusion Team February 16, 2017 01:09 PM UTC

Hi Cholet, 
 
Thanks for contacting Syncfusion support. 
 
You can update selected card with the help of ".e-cardselection" class(added to the selected card) using UpdateCard() method. Refer to the below codes. 
 
[KanbanFeatures.cshtml] 
 
<script type="text/javascript"> 
            function updateSelectedCard(){ 
                var kObj = $("#Kanban").data("ejKanban"), selectedCard, selectedCardData, selectedCardId; 
                //You can get the selected card using ".e-cardselection" class. 
                selectedCard = kObj.element.find('.e-cardselection'); 
                selectedCardId = selectedCard.attr('id'); 
                //get selected card data using getCurrentJsonData() method. 
                selectedCardData = new ej.DataManager(kObj.getCurrentJsonData()).executeLocal(new ej.Query().where(kObj.model.fields.primaryKey, ej.FilterOperators.equal, selectedCardId)); 
                selectedCardData[0].Summary = "Updated data of selected card with id " + selectedCardId; 
                //Update selected card data using updateCard() method. 
                kObj.updateCard(selectedCardId, selectedCardData[0]); 
            } 
            </script> 
 
We have prepared a sample for this. 
 
 
 
Regards,                
               
Sarath Kumar P.      
 


Loader.
Live Chat Icon For mobile
Up arrow icon