I do not want to use asp.net databinding to populate the grid. I'd rather use JSON via $.ajax() and do it all client side.
Can anyone help me by helping me find the design pattern to add rows on the client?
Hi HartigenAnthony,
I would suggest using the client binding capabilities of the grid available in 11.1. Set EnableClientRendering="true". Now, you'll have to supply an empty source on the server so that we can render the grid. Then on the client, you can use ajax to fetch your source, apply it to the grid, and bind.
var grid = $find('WDG1');
grid.set_dataSource(yourDSArray);
grid.applyClientBinding();
As an aside, if you wanted to add a row completely on the client, you again would have to use client rendering. You would need to add the new object to your source and reapply client binding. If you use grid.get_rows().add(itemArray), the grid will attempt to make its own ajax call to add it to the database and rebind on the server.
regards,
David Young
AgentD5
What objects are valid for 'yourDSArray'? JSON Objects?