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

set SelectedItemTemplate at page load

3 Answers 66 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jayesh Goyani
Top achievements
Rank 2
Jayesh Goyani asked on 21 Oct 2010, 01:36 PM
hi,
http://demos.telerik.com/aspnet-ajax/listview/examples/selecting/defaultcs.aspx

i want to set one of the item selected (with selected SelectedItemTemplate) in Page_Load in above example.





3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Oct 2010, 11:56 AM
any one have a idea how can i solve above issue?
0
Accepted
Martin
Telerik team
answered on 26 Oct 2010, 11:56 AM
Hello Jayesh,

You can use the SelectedIndexes colelction:

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadListView1.SelectedIndexes.Add(0);
    }
}

I hope this helps.

Regards,
Martin
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
Jayesh Goyani
Top achievements
Rank 2
answered on 27 Oct 2010, 06:26 AM
thanx for your post.

it work successfully.
Tags
ListView
Asked by
Jayesh Goyani
Top achievements
Rank 2
Answers by
Jayesh Goyani
Top achievements
Rank 2
Martin
Telerik team
Share this question
or