How to get current items are displaying on view?

5 posts, 2 answers
  1. Lion Pham
    Lion Pham avatar
    13 posts
    Member since:
    May 2013

    Posted 26 Jul 2014 Link to this post

    Hello,

    How can I get current items are display on view?

    Best Regards
  2. Answer
    Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 30 Jul 2014 Link to this post

    Hi,

    You can get the currently displayed items in the RadDataBoundListBox through the RadDataBoundListBox.ViewportItems property.

    Let me know should you have any other questions.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Lion Pham
    Lion Pham avatar
    13 posts
    Member since:
    May 2013

    Posted 31 Jul 2014 in reply to Ivaylo Gergov Link to this post

    Hello,

    Thank you for replying my question.

    Your answer solves my problem. However, I have one more question:

    ViewportItems returns list of FrameworkElement which are displayed in RadDataBoundListBox. However, I want to get DataItem instead of FrameworkElement. How can I do that?

    Looking forward to hearing from you.

    Best




  5. Lion Pham
    Lion Pham avatar
    13 posts
    Member since:
    May 2013

    Posted 31 Jul 2014 in reply to Lion Pham Link to this post

    I think I solved my problem. I will cast DataContext of FrameworkElement to DataItem. Is that a good solution?
  6. Answer
    Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 05 Aug 2014 Link to this post

    Hi Dung,

    Yes, this is the correct approach.

    Let me know should you need further assistance.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner