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

ComboBoxColumn Values

2 Answers 53 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 12 May 2011, 07:50 PM
Hi,

i feel like an idiot because i'm not able to find a solution for my quite easy problem:

I got a radDataGrid with 5 Columns, added through dataGrid.DataSource.

Then i added a ComboBoxColumn with name "Status", and NullValue = "False", so all in all i got 6 Columns (1 of them Comboboxcolumn)

If i change the value of the comboboxcolumn from "False" to "True", the whole row should become green.

I really have no idea how to fix this easy problem. And i really searched quite a while.

So what i wanna know: How can i read the current value in the combobox of the comboboxcolumn?
this.radGridView1.Rows[0].Cells["Status"].Value.ToString();
Above code doesn't work. I have really no idea!

Greetings
Christian

2 Answers, 1 is accepted

Sort by
0
Christian
Top achievements
Rank 1
answered on 13 May 2011, 11:26 AM
Is there no opportunity to read the value of a comboboxcolumn? If there are already existing threads, could somebody post a link to them? I can't find a solution.

Greetings
Christian
0
Stefan
Telerik team
answered on 17 May 2011, 03:37 PM
Hi Christian,

Thank you for writing.

I assume that the values for your combo box are strings with "True" and "False" values. If this is the case, then you are setting the NullValue of the column to "False". In this case the cell value will be null.

Attached you can find a small project, demonstrating the desired functionality - when the combo value is true to change the row color to green. Additionally, I have added  a button and a text box. When you click the button, the combo value from the first row is displayed in the text box.

I hope this helps. Should you have any other questions, do not hesitate to contact us.
 
All the best,
Stefan
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
Christian
Top achievements
Rank 1
Answers by
Christian
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or