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

DataTypeConverter on ComboBox column

1 Answer 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 14 Feb 2012, 09:58 AM
Hi,

I have added a TypeConverter to my ComboBox column which converts from string to Value which will allow me to paste either the Int Value or the String Value into the Combobox. This is  all working fine.

What I would like to know is it possible to copy out the string Value using this, Or would I have to use an other method to do this.

In thought if I used ComboboxCell.Value.ToString() then it would convert the value to the String Version but it doesnt.

Thanks 

David

1 Answer, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 17 Feb 2012, 10:06 AM
Hi David,

You should get the display value by invoking the GetLookupValue method of GridViewComboBoxColumn:

GridViewComboBoxColumn comboBoxColumn = ComboboxCell.ColumnInfo as GridViewComboBoxColumn;
string displayValue= comboBoxColumn.GetLookupValue(ComboboxCell.Value).ToString();

I hope this helps.

Greetings,
Svett
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
David
Top achievements
Rank 2
Answers by
Svett
Telerik team
Share this question
or