DataPager in GridView Hierarchy

3 posts, 0 answers
  1. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 01 Aug 2011 Link to this post

    Hi,

    I am using DataPager in the GridView root band.  Is it possible for child bands to have there own DataPager?  I am using my own process to faciilate lazy loading and would like to be able to control the number of rows returned and provide data paging.  If it is  possible I would imagine it would involve creating a data template of some kind.  If it is possible could you provide a code snippet

    Thanks
    Rich
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 02 Aug 2011 Link to this post

    Hello Rich,

     You can use HierarchyChildTemplate to declare the pager for child tables. Here is an example:

    <telerik:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <Grid MaxHeight="300">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
     
            </Grid>
            <telerik:RadGridView ItemsSource="{Binding Details}" />
            <telerik:RadDataPager Source="{Binding Details}" Grid.Row="1"/>
        </DataTemplate>
    </telerik:RadGridView.HierarchyChildTemplate>


    In this case Details is IPagedCollectionView.

    Kind regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 02 Aug 2011 Link to this post

    Hi,

    Is there a example program that uses this snippet.  I know I asked for a snippet but i over estimated my ability.

    Thanks
    Rich
Back to Top