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

get the value of a cell from a row that hasn't been clicked on

2 Answers 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 12 Nov 2008, 06:34 PM
Hi. I need to get the value from a cell. I'm able to get the value of a row that's been clicked on, but I'm wondering how I can get a value from one that wasn't clicked?

I'd like to use something similar to: 

variable = radgrid1.Items.Item(row index).cells(cell index)

but this hasn't worked.

Thanks

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 12 Nov 2008, 06:55 PM
Hello William,

Please test the following code:
protected void Button1_Click(object sender, EventArgs e) 
    string text = RadGrid1.Items[0]["myColumn"].Text; 

I hope this helps.

Greetings,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
William
Top achievements
Rank 1
answered on 12 Nov 2008, 09:27 PM
Daniel,

Thank-you! That did the trick.
Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
Daniel
Telerik team
William
Top achievements
Rank 1
Share this question
or