- Home
- Forum
- ASP.NET Core - EJ 2
- Binding Data to a model
Binding Data to a model
Is it possible to bind data from a column in a kanban board to a model? For example, if I wanted to grab all the items in the Done column and bind them to a done property on my model.
SIGN IN To post a reply.
4 Replies
1 reply marked as answer
RV
Ravikumar Venkatesan
Syncfusion Team
January 12, 2021 11:08 AM UTC
Hi Noah,
Greetings from Syncfusion support.
We have validated your reported query at our end and can get all the card data available in the particular column of the Kanban with the help of the getColumnData method of the Kanban. We have prepared a sample for your reference which can be downloaded from the below link.
[index.cshtml]
|
<script>
var doneData = [];
document.getElementById("Close").addEventListener('click',
function () {
if (document.getElementById('Kanban')) {
var kanbanObj = document.getElementById('Kanban').ej2_instances[0];
// Getting the Done Column data and assigning it to the variable called doneData
doneData = kanbanObj.getColumnData("Done");
// Printing the Done column data in browser console window.
console.log(doneData);
}
});
</script> |
Kindly try the above sample and get back to us if you need any further assistance.
Regards,
Ravikumar Venkatesan
Marked as answer
NJ
Noah Jacobson
January 12, 2021 04:19 PM UTC
Thanks! I am correctly grabbing all the items in the column, I verified it is getting all the items by alerting with the doneData.length, correctly showing how many items are in the column.
Once I have doneData, how can I access the data within it? I want to add these items to a list of objects within my model. Is there any documentation on the getColumnData function online?
NJ
Noah Jacobson
January 12, 2021 06:48 PM UTC
Nevermind, I figured it out! Thanks for the tip with the getColumnData, i still can't find any documentation for it.
NR
Nevitha Ravi
Syncfusion Team
January 13, 2021 04:47 AM UTC
Hi Noah,
Thanks for your update.
We are glad that our provided solution helped at your end, we will add sample to demonstrate the usage of getColumnData in our documentation which will be refreshed in our future releases.
Please get back to us if you need any further assistance.
Regards,
Nevitha
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
- Marked answer
-
NJ Noah Jacobson
- Jan 11, 2021 01:14 PM UTC
- Jan 13, 2021 04:47 AM UTC