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

Access each row content of a cell

2 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rekha
Top achievements
Rank 1
Rekha asked on 19 Jul 2012, 05:08 AM
Hello

How can we access each  row value of a particular column in radgrid? Thanks in advance....

Regards
Rekha.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 19 Jul 2012, 05:28 AM
Hi Rekha,

Please try the following code snippet to get the column value in each row.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem ditem = (GridDataItem)e.Item;
        string columnvalue = ditem["UniqueName"].Text;  
    }
}

Thanks,
Shinu.
0
Rekha
Top achievements
Rank 1
answered on 19 Jul 2012, 12:59 PM
Hi Shinu

It worked for me. Thanks a lot....

Regards
Rekha.
Tags
Grid
Asked by
Rekha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rekha
Top achievements
Rank 1
Share this question
or