Add DataPager to children

16 posts, 0 answers
  1. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 16 Mar 2012 Link to this post

    Hello telerik!

    I am using the RadTreeListView. One node can have A LOT of children! I want to use the RadDataPager to get rid of performance problems! I tried to add it - but without success. I am using this:
    <telerik:RadTreeListView.ChildTableDefinitions>
         <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}"/>
    </telerik:RadTreeListView.ChildTableDefinitions>

    So I don't want the pager to be visible on the root nodes - only for child nodes.
    How can I achieve this. Any help?

    As this is important to me, I thank you for any help!!!
    All the best,
    Tim.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 16 Mar 2012 Link to this post

    Hello,

    I am afraid that what your are trying to achieve is not possible. 

    RadDataPager is a stand-alone independent control and cannot be added to other controls in the sense that you describe. RadDataPager is a complete equivalent of the standard toolkit DataPager control provided by Microsoft. The only difference is that it is themed and styled as the other Telerik controls.

    Here is what RadDataPager is capable of. Unfortunately, you cannot somehow insert it inside RadTreeListView. RadDataPager can only page the top-level collection of RadTreeListView.

    Kind regards,
    Ross
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 19 Mar 2012 Link to this post

    Hi,

    RadTreeListView is a different control from RadTreeView which is a HeaderedItemsControl and supports HierarchicalDataTemplates. On the other hand, RadTreeListView is in fact a RadGridView in disguise and cannot handle the same scenarios as RadTreeView does.

    Unfortunately, I do not think that placing pagers inside RTLV would be possible. Maybe you should use RadTreeView instead of RadTreeListView.

    Kind regards,
    Ross
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 19 Mar 2012 Link to this post

    Hi Ross,

    thanks for your quick reply! Unfortunately I need to display additional information for each item so the radtreelistview is needed. If one wants to use the radtreelistview and has sometimes more than 10.000 child entries your suggestion is? Is there some build-in help? Any suggestions beside not to use telerik controls or cut data? Thanks again and a lot, Tim.
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 19 Mar 2012 Link to this post

    Hi,

     The only option we can suggest you is to use RadTreeView or RadGridView instead RadTreeListView to achieve your goal. 

    Kind regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 19 Mar 2012 Link to this post

    Or is it perhaps possible to give the control all of the data but to say that it at a maximum should display the first 500 entries. If the sorting is changed, all the data needed is present and again only the first 500 entries are displayed. The used data can also be changed from the user. So if the data changes the control need to find out the new 500 entries... Is something like that perhaps possible? A big thanks to you all again! Tim.
  9. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Mar 2012 Link to this post

    Hi,

     You can limit your items if you simply assign desired chunk of your collection to the treelist ItemsSource. Later you can cancel the component default sorting and perform your own similar to this demo

    Greetings,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  10. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 20 Mar 2012 Link to this post

    Hi Vlad,

    thanks for your reply! I'll give it a try!
    All the best,
    Tim.
  11. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 20 Mar 2012 Link to this post

    One short question concerning this topic: Would it be a good idea to use a QueryableCollectionView? Perhaps with this I can achieve an "in memory paging"?
  12. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 20 Mar 2012 Link to this post

    Hello. I implemented the custom paging using a QueryableCollectionView. It works like a charm! Except one thing:The scrollbar is always jumping to the top, whenever the sorting or the current page is changed! I am not reassigning any datasource. Concerning the page flip I only call, for example, MoveToPreviousPage and that's it. Why does the scrollbar jump to the top??? Any ideas? It would be really great if there would be a solution! :)

    All the best and a big thanks,
    Tim.
  13. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Mar 2012 Link to this post

    Hi Tim,

    Indeed this is the default behavior of RadGridView and RadTreeListView. The scrollbar will be reset to top on every Reset CollectionChange including sorting, paging, filtering and grouping.

    Greetings,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  14. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 22 Mar 2012 Link to this post

    Ok. And how can I change this default behavior? Thanks!
  15. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Mar 2012 Link to this post

    Hello,

     I'm afraid that this cannot be changed. 

    Kind regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  16. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 22 Mar 2012 Link to this post

    But why isn't the scrollbar jumping in this demo: http://demos.telerik.com/silverlight/#GridView/CustomSorting
  17. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Mar 2012 Link to this post

    Hello Tim,

     Can you send us your application (via support ticket) to check it locally what's going on?

    Kind regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner