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

Set GridViewComboBox entries using property builder

3 Answers 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Claude
Top achievements
Rank 1
Claude asked on 16 Dec 2010, 11:27 PM
I'm creating a grid view that will have many combobox columns in it.  I am using the property builder GUI in VS 2010 in C# to create these columns.  There does not seem to be a way to edit the collection of selectable elements in the combo box inside the property builder, as there is when creating a stand-alone RadComboBox outside of a grid.  Is there a way to do this that I am missing?  All the examples I have seen show you how to do it programmatically, which I think is not a great solution in my case because it would mix auto-generated code with hand-written code.  It would be better to do it all programmatically if that were necessary.

The number of selectable elements will always be fixed; the user cannot add to or delete from the choices.  No column value is dependent on another column value.  I am using the latest version of the Winforms dlls, Q3 2010.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 10:34 AM
Hello Claude,

I was going to attach a screenshot, but this is not currently possible. In order to do this, follow these steps:
  • Exit property builder
  • Highlight the RadGridView and select the properties tab
  • Select Columns
  • In the GridViewDataColumn collection editor, select the GridViewComboBoxColumn
  • from there you can set the datasource property / display member and value member

As far as I'm aware though, you cannot add items individually via the designer.
Hope that helps
richard

0
Accepted
Claude
Top achievements
Rank 1
answered on 17 Dec 2010, 06:40 PM
Okay, so to be clear, with a regular RadComboBox, one can specify the Items collection, but with a GridViewRadComboBox, one cannot do that.

That is unfortunate.  I guess that answers my question, in that I will have to code this all by hand rather than by using the designer.  Being able to explicitly specify the expected entries in the combo box is, I think, key to its function.
0
Richard Slade
Top achievements
Rank 2
answered on 17 Dec 2010, 11:00 PM
Glad I could help, but sorry it was not the answer yo were looking for,
All the best
Richard
Tags
GridView
Asked by
Claude
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Claude
Top achievements
Rank 1
Share this question
or