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

Radgrid column value selection on client side slection (select index changed event)

2 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Animesh
Top achievements
Rank 1
Animesh asked on 09 Dec 2012, 12:23 PM
Hi Everybody
I m stuck.. my radgrid fetches data from a stored procedure ..(DeptID,SubDeptID,DocSubject,DateUploaded).Can I have a select button (like in asp.net grids) which can be used to fire selectedindexchanged event. On the event of slectedindexchanged I want to fetch the rows values for particular columns..
Thanks  in advance

Animesh Chatterjee

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 10 Dec 2012, 04:44 AM
Hello,

protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
   {
       // Single selection
       GridDataItem item = RadGrid1.SelectedItems[0] as GridDataItem;
       string str1 = item["Name"].Text;
   }
<MasterTableView>
               <Columns>
                   <telerik:GridBoundColumn DataField="Name" UniqueName="Name" HeaderText="Name">
                   </telerik:GridBoundColumn>
               </Columns>
           </MasterTableView>



Thanks,
Jayesh Goyani
0
Shinu
Top achievements
Rank 2
answered on 10 Dec 2012, 04:49 AM
Hi,

Try the following code to achieve your scenario.
C#:
void RadGrid2_SelectedIndexChanged(object sender, EventArgs e)
   {
       foreach (GridDataItem item in RadGrid2.SelectedItems)
       {
           string value = item["Uniquename"].Text;
       }
   }

Thanks,
Shinu.
Tags
Grid
Asked by
Animesh
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Shinu
Top achievements
Rank 2
Share this question
or