I am using the 9.1 WebGrid. I am calling a client-side function AfterSelectChange to determine if I want to perform a task based on the column selected or just select the entire row. If the user selects one or more rows, he can delete the selected rows by pressing a button defined outside the WebGrid. This delete button calls a client-side function that utilizes the igtbl_deleteSelRows function to delete the rows and force a server-side DeleteRow event. On the server-side, the rows that were selected are deleted from the database. All of this works as expected however another postback occurs which causes me some headaches. This is what happens after the delete button is pressed:
Page_PreInitUG1_InitializeDataSourceUG1_DataBindingUG1_InitializeLayoutPage_LoadUG1_DeleteRowUG1_SelectedCellsChange (make sure that nothing happens when deleting)UG1_SelectedRowsChange (make sure that nothing happens when deleting)Page_PreRenderPage_PreInitUG1_InitializeDataSourceUG1_DataBindingUG1_InitializeLayoutPage_LoadUG1_SelectedCellsChangeUG1_SelectedRowsChangePage_PreRender
Another thing to mention is when a row is selected a "div" area is displayed with additional information based on what row is selected. The second postback appears to show a selection is made and indeed a row in the grid shows up in the "div" area however no row in the grid is selected.
Does igtbl_deleteSelRows or DeleteRow functions select another row in the grid after the delete event happens? What event is happening to cause a second postback? Can I prevent changes to grid from happening while in the UpdateGrid function? Looking for any kind of help here.