I think I used to do this on some older Infragistrics grid, and maybe I'm missing something obvious here, but is there any way to have the grid automatically post back changes via AJAX as they are made? So that as soon as a user edits a cell and moves to another (or a row) the change is posted back to the server and saved in the background.
Hi,
Look at this post http://community.infragistics.com/forums/p/33089/180960.aspx#180960. You do have to handle the server side event too.
For postback/validation, you can do the validation in the exitingcelledit event client side and cancel the edit if they don't want the changes. You can call up a modal webdialog window from that event.
Hope this helps.
Ed
Sorry but a little confused. Does the DECLARATIVE APPROACH mean that i don't need any code behind or client code to get the grid to update to the database? I added the selection code and it's not updating unless I get a postback from somewhere like a button.
For simple grids this would be great.
When a post back/validation is required, is there a way to keep a user from leaving the web grid they modified data unless they answer a modal confirm messagebox saying "Would you like to save the changes?" If they answer yes, then the data is saved.
Hello,
A declarative approach looks like this:
<ig:Selection CellClickAction="Row" RowSelectType="Single"> <AutoPostBackFlags CellSelectionChanged="true" /></ig:Selection>
It requires Selection behavior.
Hope this helps
You just have to capture the exitededitmode client side event call the commit method off of editingcore. You also have to handle the rowupdating event server side. You don't need any code there, but the commit won't work unless you have that event there.
function ExitedEditMode() { var grid = ig_controls["WebDataGrid1"]; var editingCore = grid.get_behaviors().get_editingCore(); editingCore.commit(); }