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
20
after selecting check box in grid row it shows uncheck after WebHierarchicalDataGrid.RefreshBehaviour
posted

I am Using, WebHierarchicalDataGrid having default paging. In the grid, I have first column in grid 'check box' in template field. When check box is check, and i click on button on top the programs works fine.

  additionally, I have drop down on top of grid. Which has numbers for showing records to  be shown in site grid. like 10, 20, 30, ....User can select any and that many records will be shown in grid.

The code for Selected_Index change in that drop down is as follows:

if (!IsRefresh)
            {
                // Set the size of records per page.
                int unitpagesize = 0;
                unitpagesize = Convert.ToInt32(drppagesizeunitlist.SelectedValue.ToString());
                this.whdgUnits.Behaviors.Paging.PageIndex = 0;
                this.whdgUnits.Behaviors.Paging.PageSize = unitpagesize;
                ViewState["UnitPageSize"] = unitpagesize;
                this.whdgUnits.RefreshBehaviors();
                updatePanelUnitsGrid.Update();
            }

 

Once i done with this, the grid shows number of records properly page.

after that if i check any check box and click on above button, I found that all check boxes are uncheck.

 

The properties for WebHierarchicalDataGrid are as follows:

<ig:WebHierarchicalDataGrid runat="server" ID="whdgUnits" Width="99.5%" EnableViewState="true" EnableDataViewState="true"   
                                        AutoGenerateColumns="False" DataMember="sqldsUnits_DefaultView" DataSourceID="whdsUnits" InitialDataBindDepth="0"   
                                        DataKeyFields="UnitID" Key="sqldsUnits_DefaultView" EnableAjax="False" ViewStateMode="Enabled">

<Columns>
                                           <ig:TemplateDataField Key="chkgrid">          
                                           <ItemTemplate>                                         
                                           <asp:CheckBox Id="chkgrid" runat="server" />
                                           </ItemTemplate>
                                           </ig:TemplateDataField>
                                            <ig:BoundDataField DataFieldName="UnitID" Key="UnitID" Hidden="true">
                                                <Header Text="UnitID" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="DisplayID" Key="DisplayID">
                                                <Header Text="Unit ID" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="UnitTypeID" Key="UnitTypeID" Hidden="true">
                                                <Header Text="UnitTypeID" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="UnitTypeName" Key="UnitTypeName">
                                                <Header Text="Unit Type" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="UnitName" Key="UnitName">
                                                <Header Text="Unit" />
                                            </ig:BoundDataField>
                                           
                                            <ig:BoundDataField DataFieldName="ProjectID" Key="ProjectID" Hidden="true">
                                                <Header Text="ProjectID" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="project_name" Key="project_name">
                                                <Header Text="ProjectName" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="SiteID" Key="SiteID" Hidden="true">
                                                <Header Text="SiteID" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="SiteName" Key="SiteName">
                                                <Header Text="Site" />
                                            </ig:BoundDataField>
                                            <ig:BoundDataField DataFieldName="project_owner_id" Key="project_owner_id" Hidden="true">
                                                <Header Text="ProjectOwnerID" />
                                            </ig:BoundDataField>
                                        </Columns>
                                        <EmptyRowsTemplate>
                                        <asp:Button ID="Button1" runat="server" Text="Button" />
                                        <asp:DropDownList ID="DropDownList1" runat="server" style="margin-left: 14px"> </asp:DropDownList>
              
                                        <asp:Button ID="Button2" runat="server" style="margin-left: 0px" Text="Button" />
                   
                                        </EmptyRowsTemplate>
                                    
                                        <Behaviors>
                                            <ig:Selection CellClickAction="Row" RowSelectType="Single" >
                                                <SelectionClientEvents RowSelectionChanged="UnitRowSelectionChangedHandler"  />
                                                <AutoPostBackFlags RowSelectionChanged="false" />
                                            </ig:Selection>
                                           
                                            <ig:Sorting>
                                            </ig:Sorting>
                                            <ig:Paging Enabled="true" PageSize="20">

                                            </ig:Paging>
                                            <ig:Filtering>
                                           
                                            </ig:Filtering>
                                            <ig:Activation>
                                            </ig:Activation>
                                        </Behaviors>
                                        
                                    </ig:WebHierarchicalDataGrid>

 

hoping that anyone could help me, and if not understood the problem ready to explain it again.

 

 

 

Parents Reply Children
No Data