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

2 posts, 1 answers
  1. Satish
    Satish avatar
    10 posts
    Member since:
    Oct 2013

    Posted 29 Oct 2014 Link to this post

    I am using radClientDataSource to bind the RadGrid , The client side pagination and page size works fine.like 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">

  2. Answer
    Viktor Tachev
    Viktor Tachev avatar
    1784 posts

    Posted 31 Oct 2014 Link to this post

    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
Back to Top