Rad list view paging selected record

6 posts, 0 answers
  1. waruni
    waruni avatar
    27 posts
    Member since:
    Jan 2008

    Posted 25 Oct 2010 Link to this post

    HI,

    I have rad grid and it has list of records, when i click on one record it shows detail information on popup page.
    For pop up page I show the rad list view control and show the detail record.
    in rad list view also have RadDataPager for showing the next previous record.
    my problem was i need to show my selected record in the rad list view control as a first page.
    that's mean when i pass the id of my record how should i show that record in first page.

    How should i do it, please help me as soon as possible, this is urgent.

    thanks
    Waruni
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 27 Oct 2010 Link to this post

    Hello waruni,

    You can try looping through the RadListView Items collection and thus try finding the desired item.

    Best wishes,
    Iana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. waruni
    waruni avatar
    27 posts
    Member since:
    Jan 2008

    Posted 29 Oct 2010 Link to this post

    Hi,

    I need to get the desired item in page load event. so what is the event that i need to call?

    I passed my result set to the pop up page and  bind that in to Rad List view control  date source , as well as i  changed the page size in to 1 in Rad Data Pager because i need to show only one record at a time.. so that in my item collection always have 1 item, so that when i looping its doesn't match my desired item.

    so how should i select my desired item when first come to the page.

    please help me.

    Thank you
    Waruni
  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 01 Nov 2010 Link to this post

    Hello waruni,

    On Page_Load the items of the RadListView might not be available. You can handle the RadListView PreRender event instead. There check if the current item is desired. If not, change the RadDataPager current page index and rebind the RadListView. Then again you need to check if the item is the desired one and so on till you get to the suitable page and item.
    Another option is to find which is the desired item directly in the RadListView data source and based on that calculate on which page will it go. Thus you can directly change the current page index to the proper one with only one rebinding of the RadListView.

    Kind regards,
    Iana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. waruni
    waruni avatar
    27 posts
    Member since:
    Jan 2008

    Posted 28 Dec 2010 Link to this post

    Hi,

    I couldn't resolved this issue yet. Can you please give a code block for this.

    thanks
    waruni
  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 30 Dec 2010 Link to this post

    Hello waruni,

    Attached is a sample project illustrating the suggested approach. However note that the algorithm for looping through all grid pages can be optimized based on your scenario.

    Regards,
    Iana
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017