Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
DeleteRowBatch and UpdateRowBatch events will not fire
posted

Could anyone tell me why the DeleteRowBatch and UpdateRowBatch events will not fire in my grid? AddRowBatch works perfectly. But if I delete a row (by pressing the delete key while the row is selected), then NONE of the batch events are fired during the next postback. Likewise, if I edit data in a row, then the UpdateRowBatch event doesn't fire.

I am using UltraWebGrid version 8.3.20083.2039. I have also tried the latest service-packed version of 9.2 with the same results.

I don't have any code in the code-behind yet... just setting the break points on the batch events. I am using LinqDataSources. Here is the markup for the grid:

                        <igtbl:UltraWebGrid ID="UltraWebGrid2" runat="server" DataSourceID="linqCourtMappingsChild"
                            DataKeyField="CourtListOptionMappingID" OnUpdateGrid="UltraWebGrid2_UpdateGrid" OnAddRowBatch="UltraWebGrid2_AddRowBatch"
                            OnUpdateRowBatch="UltraWebGrid2_UpdateRowBatch" OnDeleteRowBatch="UltraWebGrid2_DeleteRowBatch"
                            EnableViewState="true">
                            <Bands>
                                <igtbl:UltraGridBand AllowDelete="Yes" AllowUpdate="Yes" AllowAdd="Yes" RowSelectors="Yes"
                                    CellClickAction="Edit" BaseTableName="CourtListOptionMappings" DataKeyField="CourtListOptionMappingID">
                                    <Columns>
                                        <igtbl:UltraGridColumn BaseColumnName="CourtOptionCode" Key="CourtOptionCode" Type="Custom"
                                            EditorControlID="WebTextEdit1">
                                            <Header Caption="Code" />
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="Comments" Key="Comments" Type="Custom" EditorControlID="WebTextEdit1">
                                            <Header Caption="Comments" />
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="CourtListOptionMappingID" DataType="System.Int32"
                                            Key="CourtListOptionMappingID">
                                            <Header Caption="CourtListOptionMappingID" />
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="MappingListID" DataType="System.Int32" Key="MappingListID"
                                            Hidden="true" ServerOnly="true" />
                                        <igtbl:UltraGridColumn BaseColumnName="MappingListOptionID" DataType="System.Int32"
                                            Key="MappingListOptionID" Hidden="true" ServerOnly="true" />
                                        <igtbl:UltraGridColumn BaseColumnName="CourtCode" Key="CourtCode" Hidden="true" ServerOnly="true" />
                                    </Columns>
                                    <AddNewRow Visible="Yes" />
                                    <RowStyle Height="18px" />
                                    <EditCellStyle Height="18px" />
                                    <RowSelectorStyle Height="18px" Width="10px" />
                                </igtbl:UltraGridBand>
                            </Bands>
                            <DisplayLayout AutoGenerateColumns="false" OptimizeCSSClassNamesOutput="False" />
                        </igtbl:UltraWebGrid>
                        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />

  • 70
    posted

    Nevermind.

    I had some Hidden Fields outside of the grid's Update Panel. Once I moved those fields inside of the Update Panel, all the batch events were firing appropriately.