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

Gridview which rows are checked?

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
noyan
Top achievements
Rank 1
noyan asked on 11 Mar 2009, 02:18 PM
I got a treeview which is showing departmen relations and have also a gridview showing peoples, I added 

<

 

telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
to enable gridview for supporting selection and unselection and I want to let user select departmen from left and peoples from right and when user clicked relation button. people-departmen relationship will be build. But I dont know how to know which gridview rows are checked and how to get person ids of selected rows. Could you help me? thank you in advance

 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Mar 2009, 06:16 AM
Hello,

I suppose you want to get the person ids for selected rows in the grid. If so, you can loop through the selected items and get the ids for  the selected rows as shown below. If this is not the case, then paste your aspx code here, so that I would get a better idea.
cs:
 protected void Button_Click(object sender, EventArgs e) 
    { 
        foreach (GridDataItem selectedItem in RadGrid1.SelectedItems) 
        { 
           string strtxt = selectedItem["PersonID"].Text; 
        } 
    } 

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