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
725
WHDG RowUpdating event not firing every postback
posted

Yet another vexing WHDG issue.  I am working with 13.2 build 3028.

 

I have a page with two instances of WHDG; one is single-level, one has a child band.  Markup is below.  I've made the configuration of the two grids as similar as possible.

In both grids, I have a number of non-editable columns and one editable checkbox template column (on the parent in the parent/child grid).

I want to do manual CRUD, so I am handling the RowUpdating event for each one.

The single-tier grid works fine, firing RowUpdating for each modified row on every postback.  The parent/child grid, however, fires RowUpdate only on every second postback.  For wxample, I click a row to change the checked value (the data in the row switches to italics, so I know the grid sees the edit), then I click a button that does a post back, but RowUpdating doesn't fire.  Also, the row in the grid returns to it's original values.  If I click the checkbox again and cause a postback, the RowUpdating DOES fire.  Another edit and postback does NOT fire the event, then a fourth edit and postback DOES fire it, etc.

I know that the postback always rebinds the data to the grid, but it does exactly the same thing every time, so that shouldn't affect the RowUpdating.

I've done a lot of exploration on this and can't find what is happening.

Any suggestions on what could be causing this?

 

    <table ID="cfbResultsTable" class="resultsGrid" runat="server">

         <tr>

             <td style="width:10px">&nbsp;</td>

             <td>

                 <cc1:QueryResults ID="cfbResults" runat="server"

                     oneventbuttonclicked="loadTicketsResults_EventButtonClicked"

                     DateFormat="" Height="140px"

                     AutoGenerateBands="False" AutoGenerateColumns="False" oninitializerow="cfbResults_InitializeRow"

                     DefaultColumnWidth="90px" onrowupdating="cfbResults_RowUpdating"

                     oncustomsummarycalc="cfbResults_CalculateCustomSummary" Width="100%"

                     oncalculatecustomsummary="cfbResults_CalculateCustomSummary"

                     DataKeyFields="id">

                     <ClientEvents Initialize="queryCfbInitGrid" />

                     <GroupingSettings EmptyGroupAreaText="Drag a column header here to group by that column.">

                     </GroupingSettings>

                     <Behaviors>

                         <ig:SummaryRow Enabled="False" EnableInheritance="True" FormatString="{1}"

                             ShowSummariesButtons="False" EmptyFooterText="-x-">

                         </ig:SummaryRow>

                         <ig:ColumnMoving></ig:ColumnMoving>

                         <ig:ColumnResizing>

                         </ig:ColumnResizing>

                         <ig:EditingCore AutoCRUD="False" BatchUpdating="True">

                             <EditingClientEvents CellValueChanged="loadCFBsCellUpdate" />

                             <Behaviors>

                                 <ig:CellEditing>

                                     <EditModeActions MouseClick="Single" />

                                 </ig:CellEditing>

                             </Behaviors>

                         </ig:EditingCore>

                         <ig:Sorting SortingMode="Multi">

                             <SortingClientEvents ColumnSorted="queryCfbInitGrid" />

                         </ig:Sorting>

                     </Behaviors>

                 </cc1:QueryResults>

             </td>

         </tr>

     </table>

     <br />

     <table class="resultsGrid">

         <tr>

             <td style="width:10px">&nbsp;</td>

             <td>

                 <cc1:QueryResults ID="loadTicketsResults" runat="server"

                     onlinkbuttonclicked="loadTicketsResults_LinkButtonClicked"

                     AutoGenerateBands="False" AutoGenerateColumns="False" DateFormat=""

                     QueryDatasetId="0" QueryFilterId="0" SecurityAppDesc="" TotalRows="0" DefaultColumnWidth="90px"

                     Height="410px" DataKeyFields="id"

                     onrowupdating="loadTicketsResults_RowUpdating" Width="100%"

                     oncustomsummarycalc="loadTicketsResults_CalculateCustomSummary"

                     ShowCustomSummary="False" InitialDataBindDepth="-1"

                     oninitializerow="loadTicketsResults_InitializeRow"

                     oneventbuttonclicked="loadTicketsResults_EventButtonClicked" >

                     <Bands>

                         <ig:Band AutoGenerateColumns="False" DataKeyFields="id"

                             DefaultColumnWidth="90px" Key="ChildBand_0" Width="800px">

                         </ig:Band>

                     </Bands>

                     <ClientEvents Initialize="queryTicketInitGrid" />

                     <GroupingSettings EmptyGroupAreaText="Drag a column header here to group by that column.">

                     </GroupingSettings>

                     <Behaviors>

                         <ig:ColumnMoving EnableInheritance="True"></ig:ColumnMoving>

                         <ig:ColumnResizing EnableInheritance="True"></ig:ColumnResizing>

                         <ig:EditingCore AutoCRUD="False" BatchUpdating="True" EnableInheritance="True">

                             <EditingClientEvents CellValueChanged="loadTicketsCellUpdate" />

                             <Behaviors>

                                 <ig:CellEditing EnableInheritance="True">

                                     <EditModeActions MouseClick="Single" />

                                 </ig:CellEditing>

                             </Behaviors>

                         </ig:EditingCore>

                         <ig:SummaryRow Enabled="False" EnableInheritance="True"

                             ShowSummariesButtons="False">

                         </ig:SummaryRow>

                     </Behaviors>

                 </cc1:QueryResults>

             </td>

         </tr>

     </table>

 

 

Parents
No Data
Reply
  • 725
    Offline posted

    Further information.

    The lack of firing of RowUpdating happens only when the parent/child grid has exactly one row in the parent.  When it has more than one, the event fires every time.  The other grid on the page (single tier) fires every time regardless of how many rows it contains.

    Also, the event fails to fire on the first and third postback, but will fire on the second, fourth and every one after.

     

Children