Hello,I would like in my codebehind to manually remove or cancel a specific event handler, UpdateCellBatch for example, how can I do that?Also, how do I re-activate the event once it is removed?
Thanks
Hello,
You can use the property Cancel of e to cancel the event. Please take a look at the code below: protected void UltraWebGrid1_UpdateCellBatch(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) { e.Cancel = true; } protected void UltraWebGrid1_UpdateCell(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) { e.Cancel = true; }Also Im not sure to understand re-activation of the event could you please provide little bit more additional information about.
Hope this helps.Thanks.
By default my webgrid uses event updatecellbatch.What I want to do is based on the status of a checkbox:-if checkbox checked: we use updatecellbatch- we remove updaterow and updategrid eventhandler-When checkbox is uncheck: we remove the updatecellbatch and we instantiate updaterow and updategridThis will give my user the capability to decide if they want to save their data by clicking a button and saving the entire grid or to save their data each time they change row
But I do not know how to properly remove and eventhandler.Also, why should I useupdatecellbatch instead of updaterowbatch, is there any performance difference between those 2?Thanks