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

How to get the values of the particular column on onCheckChanged inside the grid.mastertableview

1 Answer 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Asif
Top achievements
Rank 1
Asif asked on 03 Aug 2010, 04:24 PM
Hi,
        I have checkbox in one of the column in GridTemplateColumn-ItemTemplate inside the radgrid.mastertableview. On selecting the checkbox it fires the OnCheckedChanged event. In that event, I need to get value of the all other columns in that particular row. Please get me the solution as soon as possible.

Regards,
Asif
    

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Aug 2010, 09:09 AM

Hello Asif,

In order to achieve this access the DataItem using NamingContainer property of CheckBox and then access the cell value using 'ColumnUniqueName'.

C#:

protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
        CheckBox chk = (CheckBox)sender;
        GridDataItem item = (GridDataItem)chk.NamingContainer;
        string value = item["ColumnUniqueName"].Text; //get value using ColumnUniqueName
    }


Thanks,
Princy.

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