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

key down in Hierarchical grid

2 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Atefeh
Top achievements
Rank 1
Atefeh asked on 14 May 2012, 05:48 AM
Hello
i have a Hierarchical grid that i want to press key Enter on child rows to open another form but i can't control that it is  the parent row or it's a child row.
Would You please help me how can I understand  that selected row is Child row or parent row?

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 16 May 2012, 04:52 PM
Hi Atefeh,

Thank you for writing.

One way to determine if a row is a child row is to check its HierarchyLevel property. Here is a sample:
void radGridView1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
    if (e.KeyCode == Keys.Enter && radGridView1.CurrentRow.HierarchyLevel >1)
    {
 
    }
 }

I hope this helps.
 
All the best,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Atefeh
Top achievements
Rank 1
answered on 17 May 2012, 08:32 AM
HI Stefan
thanks a lot. It's work.
Tags
GridView
Asked by
Atefeh
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Atefeh
Top achievements
Rank 1
Share this question
or