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

Highlight the row

1 Answer 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
macky
Top achievements
Rank 1
macky asked on 20 Jul 2010, 09:46 PM
Hi Telerik Staff,


            I populate the the RadGridView and it has no row selected and highlighted.

           Question;
                            How do I code to highlight the row in RadGridView or  I even choose which row I want to select and put a focus on that row then put a highlight?


Thanks,
Mac

1 Answer, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 21 Jul 2010, 06:16 AM

Hello macky,

If you set IsSynchronizedWithCurrentItem to true the first row will be selected automatically. If you would like to select a different item you can use the DataLoaded event to do so:

// subscribe for DataLoaded event
private void playersGrid_DataLoaded(object sender, EventArgs e)
{
    if (isInitialized)
        return;
  
    isInitialized = true;
    // select the third item
    this.playersGrid.SelectedItem = this.playersGrid.Items[2];
}



Greetings,
Milan
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
General Discussions
Asked by
macky
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or