This is a migrated thread and some comments may be shown as answers.

Template column not showing when page size changes in radGrid using radclientdatasource.

1 Answer 81 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Satish asked on 29 Oct 2014, 08:13 AM
I am using radClientDataSource to bind the RadGrid , The client side pagination and page size works below link.

Problem is : when page size changes from  5 to 10 , the template column (having checkbox in it) is not showing for another 5 rows...first 5 rows i am able to see checkbox control but not for another 5 rows in grid.

Please help me.

Below is the code for ref:

      <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server">
            <WebServiceDataSourceSettings >
                <Select Url="http://localhost:1100/Invoice/InvoiceService.svc/InvoiceLucen" DataType="JSON" />
                <telerik:ClientDataSourceModelField FieldName="SiteName" DataType="String" />
                  <telerik:ClientDataSourceModelField FieldName="AccountNo" DataType="String" />
                  <telerik:ClientDataSourceModelField FieldName="VendorName" DataType="String" />
                  <telerik:ClientDataSourceModelField FieldName="CommodityName" DataType="String" />
                  <telerik:ClientDataSourceModelField FieldName="ServiceMonth" DataType="Date" />
    <telerik:RadGrid runat="server" ID="RadGrid1" ClientDataSourceID="RadClientDataSource1"
        Width="306px" Skin="DV" AllowPaging ="true" EnableEmbeddedSkins="false" PageSize ="5"  >
                 <telerik:GridTemplateColumn UniqueName="CheckBox">
                                            <div style="float:left; width:43px;">
                                            <asp:CheckBox ID="ChkHeaderSelect" runat="server" onClick="CheckGrdAllCheckBox(this)" CssClass="queecheckbox" />
                                            <asp:CheckBox ID="ChkSelect" runat="server" onClick="UncheckheaderCheckBox(this)" />
                <telerik:GridBoundColumn DataField="SiteName" HeaderText="Site Name" UniqueName="column">
                <telerik:GridBoundColumn DataField="AccountNo" HeaderText="AccountNo" UniqueName="column1">
                 <telerik:GridBoundColumn DataField="VendorName" HeaderText="Vendor Name" UniqueName="column2">
                 <telerik:GridBoundColumn DataField="CommodityName" HeaderText="Service" UniqueName="column3">
                 <telerik:GridBoundColumn DataField="ServiceMonth" HeaderText="ServiceMonth" UniqueName="column4">

1 Answer, 1 is accepted

Sort by
Viktor Tachev
Telerik team
answered on 31 Oct 2014, 03:12 PM
Hello Satish ,

Note that the CheckBox is a server-side control. It order for it to be displayed as expected it needs to be rendered on the server. When client-side binding is used for RadGrid it is rendered on the server initially. However, the operations after this are performed client-side. Because no postback is performed when changing page size there are no additional rendered CheckBox controls.

If you would like to use the CheckBox controls to select rows in RadGrid you might consider using GridClientSelectColumn. It provides this functionality out of the box. Check out the following article that describes the GridClientSelectColumn in more detail:

Viktor Tachev
Asked by
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question