Hello,
I'm trying to get a grid to postback after I change a cell,however igtbl_needPostBack isn't working. I call the aftercellupdatehandler and the alert in the handler is getting called, but no postback. is there a setting somewhere that I need to change so this will work? I know a postback will update the database because I tried making a button action postback and that worked perfectly. Any suggestions?
function MainGrid_AfterCellUpdateHandler(gridName, cellId) { alert("test"); igtbl_needPostBack(gridName); }
You can programatically set the handler for the UpdateCell event, it will fire every time a cell is updated and cause the postback so you can do whatever you want server side.
UltraWebGrid1.UpdateCell += new Infragistics.WebUI.UltraWebGrid.UpdateCellEventHandler(UltraWebGrid1_UpdateCell);
{
//Your logic. Cell's properties and methods available thorugh e.Cell
}
How would I go about 'hooking up' the events to update the database?
I think I might have an idea what is going on. For postback to occur immediately, you need to hook the server-side UpdateCell or UpdateRow events. If you do that, it will happen automatically. If you need to update batches of cells/rows, you can hook UpdateCellBatch or UpdateRowBatch events - in this case, postback will not happen for each cell but rather at once on postback.
So in thise case I think wiring the server-side events (the ones you need per your scenario) should address the problem.