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

[Solved] RadGrid Cell value

2 Answers 360 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 05 Jun 2009, 03:14 PM
i have a radcombobox in a template of a radgrid, i need to get the value of another radgrid cell when in this event

 

protected void rcbPrivate_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

 

string theval = e.Text; // this is the selected value of the RCB, but also need the recordid that is bound to a hyperlink in another cell
int therowid = //not sure how to get the cell value of this row from another cell of the rad grid

 

 

 

}

please advise.

2 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 05 Jun 2009, 06:16 PM
I've tried this - still no luck - any help is much appreciated

protected

 

void rcbPrivate_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

 

string theval = e.Text;

 

 

GridBoundColumn colDates = RadGrid1.Columns.FindByUniqueName("column1") as GridBoundColumn;

 

Label2.Text = theval.ToString() + colDates.ToString();

 

}

0
Daniel
Telerik team
answered on 07 Jun 2009, 08:48 PM
Hello Jeff,

Please try the following approach:
protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    GridDataItem item = (o as RadComboBox).NamingContainer as GridDataItem; 
    string textContent = item["ColumnName"].Text; 

Let me know if you need more information.

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or