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

Dynamic ComboBox

6 Answers 280 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Louis asked on 15 Sep 2007, 12:42 AM
Hi,

I want to have a grid with a combo box column, but for each row, I want to apply different DataSource in the combo cox. The values in the combo box are depending on another column value for each row.

I can't use the MasterGridViewTemplate, because it's applying the SAME datasource for each row, so what should I do?

6 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 18 Sep 2007, 08:34 AM
Hi Louis ,

There is no such functionality out-of-the-box. in the current version of the product However, I would suggest as a possible workaround using the CellBeginEdit event and changing in the event handler the data source of the column to the desired one. Note that this will not work if you use combobox column as a look-up column.

Please, tell us if this helps.
 

All the best,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Dan
Top achievements
Rank 2
answered on 01 Oct 2007, 08:10 PM
Georgi,

   This suggestion does not quite seem to work as expected.  When I change the datasource on cellbeginedit, the timing seems to be off because it will show the empty combo then if I selected another cell the last cells values will be loaded.  So it is always one behind.
0
Dan
Top achievements
Rank 2
answered on 02 Oct 2007, 12:30 PM
Timing wise, it is better to use the CurrentRowChanged event.  One last question about the Gridview combobox column.  Does the combobox always run in "DropDownList" mode where freeform typing is restricted?  If so a open combobox that allows you to type in a value is needed.
0
Georgi
Telerik team
answered on 03 Oct 2007, 03:17 PM
Hi Dan,

Indeed, the CurrentRowChanged event could do the work as well as the CellBeginEdit (we've tested it and found no irregularities). If you need any further assistance with this, let us know.

In response to your second question: currently, it is not possible to type text freely within the text are of the DropDown list. It only allows you to select the value from the items in the drop-down window. We're working on implementing this feature - it will be introduced in the next major release (Q3 2007) at the latest.

Thank you for your time.

Best wishes,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
shortie
Top achievements
Rank 2
answered on 10 Nov 2009, 02:50 AM
We need to provide this functionality to our customers. Is there any new method now? We are using 2009 Q2 SP1 & Q3. Thanks in advance.

BR/shortie

0
Nikolay
Telerik team
answered on 13 Nov 2009, 02:16 PM
Hello ChunChang,

With the latest version of RadControls for WinForms you can enter the manually typed text in the combobox editor of GridViewComboBoxColumn.

For additional information, refer to the following forum post: GridViewComboBoxColumn: let user add values that are not in datasource.

I hope this helps. If you have additional questions, feel free to contact me.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Louis
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Dan
Top achievements
Rank 2
shortie
Top achievements
Rank 2
Nikolay
Telerik team
Share this question
or