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

Nested template view is not working with more that 10 records

6 Answers 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Raju
Top achievements
Rank 1
Raju asked on 15 Sep 2012, 06:28 AM
I have used telerik rad grid client-side programmatic binding. Binding is working fine but the nested view template expand image button is not displaying with more than 10 records. I am adding user control dynamically to that nested view template.

  
<telerik:RadGrid ID="rgInvoiceDetails" runat="server" GridLines="None" AllowSorting="false" AutoGenerateColumns="False" CellSpacing="0">
  <ClientSettings>
 <ClientEvents OnCommand="rgInvoiceDetails_Command" OnHierarchyExpanding="rgInvoiceDetails_HierarchyExpanding"
       OnRowDataBound="rgInvoiceDetails_RowDataBound" />
  </ClientSettings>
   <MasterTableView ClientDataKeyNames="FeeChassisInvoiceDetailID,Disputed" CommandItemDisplay="Top"
     Width="100%" HierarchyLoadMode="Client">
 <Columns>
  <telerik:GridBoundColumn DataField="ChassisNumber" HeaderText="Chassis" />
 <telerik:GridBoundColumn DataField="BillFromDate" HeaderText="Out Gate" DataFormatString="{0:d}" />
 <telerik:GridBoundColumn DataField="BillToDate" HeaderText="In Gate" DataFormatString="{0:d}" />
 <telerik:GridBoundColumn DataField="BillDays" HeaderText="Days" />
  <telerik:GridBoundColumn DataField="Rate" HeaderText="Rate" DataType="System.Decimal"
  DataFormatString="{0:c}" />
 <telerik:GridBoundColumn DataField="FeeAmount" HeaderText="Total" DataType="System.Decimal"
 DataFormatString="{0:c}" />
  <telerik:GridBoundColumn DataField="Disputed" HeaderText="" ItemStyle-CssClass="MyCustomHeaderClass" />
 </Columns>
 <NestedViewTemplate>
 </NestedViewTemplate>
<HeaderStyle CssClass="MyCustomHeaderClass" />
 </MasterTableView>
 </telerik:RadGrid>

Thanks in advance.

6 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 15 Sep 2012, 06:29 PM
Hello,

Your nestedview is working correctly.

Problem is in Clinet side binding.

(i guess that your page size is 10) Issue is when page is load first time at that page expancollapse column is create INPUT tag only for 10 rows. So when you change the page from 10 to 20 at client side at that time you can only see only 10 images and 10 blank cell.

Please check attached screenshot and also check in your page so you can identify issue.

Try to bind your grid with below methods.
Please also check below link/demo for reference.
Grid / Declarative Binding
RadGrid with WCF Rest Service
OR
<telerik:RadGrid  PageSize="100" />

 on Clientside when you bind Datasource to your grid also set pagesize =10.
And now check you pagging works up to 100 pagging perfectly.

Thanks,
Jayesh Goyani
0
Raju
Top achievements
Rank 1
answered on 17 Sep 2012, 09:07 AM
Thanks reply Mr. Jayesh Goyani. I have changed PageSize to 100, it worked as expected.
But i am not using paging. If i get more than 100 records i think same problem will come.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 17 Sep 2012, 10:17 AM
Hello,


Sorry but we can not manage this thing.

If you want to resolved this issue then when page is load first time at that time get record count and set its pagesize as per pagecount in page_load.



Thanks,
Jayesh Goyani
0
Madhu
Top achievements
Rank 1
answered on 26 Sep 2012, 07:34 PM
Jayesh,

Sorry to ask. But does paging work in any of the client side bindings. I tried this and same behavior.

http://demos.telerik.com/aspnet-ajax/grid/examples/clientbinding/defaultcs.aspx

This does not use Jquery.
If paging with client side wcf is a problem I want to skip this approach all together.

Thanks,
Madhu
0
Raju
Top achievements
Rank 1
answered on 22 Oct 2012, 02:55 PM
Hi, Can you please tell me how to display loading image for telerik grid client side binding. I am not able to display loading image.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 23 Oct 2012, 06:29 AM
Hello Madhu,

Pagging is not worked with client side binding and jquery ajax call only when radgrid have any templatecolumn, NestedviewTemplate................

Note : it worked perfectly with boundcolumn,checkboxcolumn,numericcolumn...........

Thanks,
Jayesh Goyani
Tags
General Discussions
Asked by
Raju
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Raju
Top achievements
Rank 1
Madhu
Top achievements
Rank 1
Share this question
or