DataTypeConverter on ComboBox column

2 posts, 0 answers
  1. David
    David  avatar
    67 posts
    Member since:
    Aug 2010

    Posted 14 Feb 2012 Link to this post


    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.


  2. Svett
    Svett avatar
    728 posts

    Posted 17 Feb 2012 Link to this post

    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.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top