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

How do I select the first item in the property grid so description shows up

1 Answer 509 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
Martin Hamilton asked on 14 May 2016, 03:01 AM

I have a property grid with numerous groups.

How do I cause the first item within the first group to be selected so that the Description box is populated with the 'description' for that first item?

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 May 2016, 07:06 AM
Hello Martin,

Thank you for writing.

In order to select a specific item from RadPropertyGrid, you can access it in the GridItems collection of the group and set the Selected property to true:
public Form1()
{
    InitializeComponent();
    this.radPropertyGrid1.SelectedObject = this;
    radPropertyGrid1.PropertySort = PropertySort.CategorizedAlphabetical;
    radPropertyGrid1.SortOrder = SortOrder.Descending;
    this.radPropertyGrid1.Groups[0].GridItems[0].Selected = true;
}

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
PropertyGrid
Asked by
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or