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

RadDataPager : Direct Link to a specific item

1 Answer 23 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Evelyne Schreiner
Top achievements
Rank 1
Evelyne Schreiner asked on 30 Aug 2010, 02:51 PM

I'm using a RadListview with RadDataPager and it's working fine.

Now, I need to create hyperlinks to items which may be in any page of the RadListView. How can I specify the wanted item ID to display to the listview and letting it opens the right page containing it ?

Thank you

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 02 Sep 2010, 11:21 AM
Hi Evelyne,

When paging is enabled for the RadListView control, the RadListView is aware only for the records displayed on the current page. Therefore to achieve your goal, you can loop through the items on the current page and see if there is the desired item. If not, then change the CurrentPageIndex of the RadListView and loop again through its items and so on, until you get to the proper page.
Another option is to find the desired record in the RadListView data source and calculate on which page it would appear in the RadListView. Then set the CurrentPageIndex and rebind it.

Give it a try and let me know if any questions arise.

All the best,
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
Tags
ListView
Asked by
Evelyne Schreiner
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or