How to add multidimesional array to webdatagrid
The following code doesn't work
gGrid.get_rows().add([[10, "test value", 0,0,0,0,0,0,0][20, "test value", 0,0,0,0,0,0,0]]);
Hello,
You might want to try by creating a new Array var. What I think is that you can do it on separate lines or in a loop, depending on your requirements.
Please note that if you are going to do this you would need to have the BatchUpdate set to true on the Editing Core.
Hello Niranjani,
Boris suggestion is correct, you can iterate through all items in the array, and to perform .Add() for each of them, because this function accepts one parameter, which can be array of the new row value i.e. ["ALFKI", "John", 30]. Or a JSON-notation object with { column-key : cell-value } pairs; example: { "ID": "ALFKI", "FirstName": "John", "Age": 30 }.
Let me know if we may be of further assistance.
Thanks Boris, Batch updating worked perfectly. will get back for further assistance
Hello Nirajani,
I am glad that we've managed to help you.
Thank you for using our controls!
Hi Boris and Zdravko,
I observe that enabling Batch Update fails to call ClientEvents Initialize="InitGrid" function in the javascript.
Please let me know how can I hit this method even after enabling Batch Update