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

URGENT - Add blank to GridViewComboBoxColumn?

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lindsay Miles
Top achievements
Rank 1
Lindsay Miles asked on 20 Jun 2013, 01:58 PM
Hello,

PLEASE SOMEONE ANSWER THIS ASAP.

I bind a GridViewComboBoxColumn to a list of objects, now problem at all with anything there including setting to currently selected value.
I need to give the user the option of selecting blank item as that field can be empty. Need to put a blank item into the GridViewComboBoxColumn at the top of the list.

HOW CAN I DO THAT? Standard combobox is easy and I don't want to use those in a CellEditTemplate either as using that will change the ViewModel(s) and bindings quite a bit.

Thanks

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 25 Jun 2013, 03:34 PM
Hello,

 You can inherit from GridViewComboBox column and override the CreateCellElement and CreateCellEditElement. There you can access the RadComboBox content, without specifying new DataTemplates.

Regards,
Ivan Ivanov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Lindsay Miles
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or