Using DataPager with a Child Grid

5 pts.
Tags:
Data Pager
Grid View
I'm using the RadGridView with a DataPager on a Parent Grid and it works fine.  For each row in the ParentGrid, I'm defining a RowDetailsTemplate to have a child binded grid.  This also works fine, but I can't use the DataPager with the inner child grid.  The reason seem obvious to me, but the solution is not.  I think the problem is that I can not name the child grid using x:name, because then the child grid for each row will have the same name, causing an error.  If I can't name the child grid, how do I link the data pager?

Is there a way to link a RadGridView with a DataPager, without assigning a specific x:name to the RadGridView and DataPager: Element?

Or perhaps Is there a way to assign a x:name to the RadGridView at runtime, and also link it to the DataPager:Element at runtime? In this case I would name each Rows ChildGrid as ChildGrid0, ChildGrid1, ChildGrid2, etc... assuring that each child grid had a unique name.  I'm originally from the Jsp/Java world and this kind of name iteration at runtime is quite easy.  It's perhaps the only thing so far that is easier in Jsp. 

Here is a sampe mock-up of the code.  My actual code has a bit more detail, but I stripped it down for the purpose of this example:

<data:DataGrid x:Name="ParentGrid" AutoGenerateColumns="True">     <data:DataGrid.RowDetailsTemplate>         <DataTemplate>             <StackPanel>                 <telerikGridView:RadGridView x:Name="ChildGrid" ItemsSource="{Binding ActualTerms}" AutoGenerateColumns="True"/>                 <data:DataPager Source="{Binding ItemsSource, ElementName=ChildGrid}" PageSize="4"></data:DataPager>           </StackPanel>         </DataTemplate>     </data:DataGrid.RowDetailsTemplate> </data:DataGrid> <data:DataPager Source="{Binding ItemsSource, ElementName=ParentGrid}" PageSize="4"></data:DataPager>

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following