This is a migrated thread and some comments may be shown as answers.

Rad list view paging selected record

5 Answers 194 Views
ListView
This is a migrated thread and some comments may be shown as answers.
waruni
Top achievements
Rank 1
waruni asked on 25 Oct 2010, 10:29 AM
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

5 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 27 Oct 2010, 03:05 PM
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
0
waruni
Top achievements
Rank 1
answered on 29 Oct 2010, 10:32 AM
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
0
Iana Tsolova
Telerik team
answered on 01 Nov 2010, 04:03 PM
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
0
waruni
Top achievements
Rank 1
answered on 28 Dec 2010, 06:10 AM
Hi,

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

thanks
waruni
0
Iana Tsolova
Telerik team
answered on 30 Dec 2010, 11:29 AM
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.
Tags
ListView
Asked by
waruni
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
waruni
Top achievements
Rank 1
Share this question
or