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

Find out what level was selected on hierarchical grid

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jtawja
Top achievements
Rank 1
jtawja asked on 28 Aug 2008, 04:27 PM

I know that you can get the Name of the level selected on the gridcommandEventArgs on the Item Command of the Grid. 
Example:

Dim SelectedLevel As String

SelectedLevel = e.Item.OwnerTableView.Name

If SelectedLevel = "second level" Then

End if

I need to do this from a button press on an event args to see what level is selected and the code will not work and I can't seem to find anything on it, does anyone have any suggestions???

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Aug 2008, 05:34 AM
Hi,

You can try out the following code to get the required result.
cs:
protected void Button1_Click(object sender, EventArgs e) 
    { 
        foreach (GridDataItem item in RadGrid1.SelectedItems) 
        {                
            string level = item.OwnerTableView.Name;             
        }   
 
    } 

Princy.
Tags
Grid
Asked by
jtawja
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or