Data grid and javascript
Greetings,
Is there a way to bind textbox data from javascript to a data grid? I used getvalue to get the text box value but I am not able to insert it into the data grid. Please not it is not lookup list, I added the columns manually
-
Hi N
Yes, there is. The control data grid is from Kendo UI (kendoGrid). Therefore, you can use the out of the box functionality of Kendo.
Documentation: jQuery Grid Documentation | Configuration, Methods, Events - Kendo UI for jQuery (telerik.com)
Here is a sample for your case. Not sure if the best way but had not enough time for a full test:
I've created a data grid called "DataGrid" with two fields "Title and "Created" and with a push of a button this function get called:
function addRow() {let newRow = { Title: "Hello World", Created: new Date() };var grid = $("#DataGrid").data("kendoGrid");grid.dataSource.insert(newRow)}
Hope it helps,
Tobias
Please sign in to leave a comment.
Comments
1 comment