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

[Solved] set blank text to GridDropDownColumn when no matching value

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Revital Keren
Top achievements
Rank 1
Revital Keren asked on 25 Jun 2009, 02:34 PM
Hi,
I have a GridDropDownColumn which is bound to a datafield.
The column works very well - shows the right text for the corresponding values.

Problem is when the datafield holds a value which does not exist in the DropDown DataSource the Column always displays the first value in the DataSource.
My wish is to display a blank value (not text) when there is no matching Value in the dataSource.

Is there an easy way to do that (I mean without catching the ItemDataBound event and manually checking each value against the dataSource).

Thanks,
Revital

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 30 Jun 2009, 10:44 AM
Hi Revital,

Try setting GridDropDownColumn's EnableEmptyListItem="True" property. Now records that do not have a matching value in the dropdown column's data source should display empty values in this field.

Greetings,
Veli
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
Revital Keren
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or