Philippe GRACA
Top achievements
Rank 1
Philippe GRACA
asked on 23 Jun 2010, 05:41 PM
Hello
I'm facing an intersting issue
I want to select an item in a paged listview when the page is displayed.
The selected item key is stored in session
How can I achieve that?
Thanks and regards
Philippe
I'm facing an intersting issue
I want to select an item in a paged listview when the page is displayed.
The selected item key is stored in session
How can I achieve that?
Thanks and regards
Philippe
7 Answers, 1 is accepted
0
Accepted
Hi Philippe,
I have attached a sample page which demonstrates a basic implementation of the requested functionality.
All the best,
Rosen
the Telerik team
I have attached a sample page which demonstrates a basic implementation of the requested functionality.
All the best,
Rosen
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
Henric
Top achievements
Rank 1
answered on 03 Jun 2011, 12:08 PM
This is interesting,
however, is it possible to make the listview to actually show the selected item by default?
Something like this:
1. Select the current page in the DataPager
2. Make the listview "Scroll-into-view" of the selected item.
however, is it possible to make the listview to actually show the selected item by default?
Something like this:
1. Select the current page in the DataPager
2. Make the listview "Scroll-into-view" of the selected item.
0
Tony
Top achievements
Rank 1
answered on 13 Jun 2011, 12:25 PM
I would like something similar:
How to get the first row in listview to be automatically selected?
How to get the first row in listview to be automatically selected?
0
Hello Tony,
Add the desired item to the RadLIstView SelectedIndexes collection:
Greetings,
Iana
the Telerik team
Add the desired item to the RadLIstView SelectedIndexes collection:
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadListView1.SelectedIndexes.Add(0);
}
Greetings,
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.
0
Jim
Top achievements
Rank 1
answered on 16 Feb 2012, 04:03 PM
Is it possible to get the ListView to scroll to the selected item? The routine that's posted works well but in my case, the highlighted item can be quite far down in the scrollable list.
0
Hi Jim,
Scrolling inside RadListView is not a built-in functionality (as the layout depends on the respective template that you specify), so the logic for scrolling to a certain item mostly depends on your own scenario. If the items container is a div, the solution should be similar to what is discussed in this thread:
http://stackoverflow.com/questions/635706/how-to-scroll-to-an-element-inside-a-div
Let us know if you have questions related to the control's API for implementing this functionality.
All the best,
Tsvetina
the Telerik team
Scrolling inside RadListView is not a built-in functionality (as the layout depends on the respective template that you specify), so the logic for scrolling to a certain item mostly depends on your own scenario. If the items container is a div, the solution should be similar to what is discussed in this thread:
http://stackoverflow.com/questions/635706/how-to-scroll-to-an-element-inside-a-div
Let us know if you have questions related to the control's API for implementing this functionality.
All the best,
Tsvetina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Jason Horspool
Top achievements
Rank 1
answered on 10 May 2012, 10:28 PM
**** solved ****
"Is there any way to do the selection after databinding has happend on the RadListView? We need to do some logic against each row to determine if the row should be selected."
I found the 'FireCommandEvent' method to select the items!
"Is there any way to do the selection after databinding has happend on the RadListView? We need to do some logic against each row to determine if the row should be selected."
I found the 'FireCommandEvent' method to select the items!