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

Editable values for new row using GridViewMultiComboBoxColumn?

6 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
mtaber
Top achievements
Rank 1
mtaber asked on 01 Mar 2012, 05:51 AM
I have a situation where I'd like to provide the user with some common values to select for a column in a GridView, based on the value of another column that exists in the row. I know this can be done with the AutoComplete mode on the column. The problem is that I'd also like to allow them to add a new value that doesn't appear in the list if they want. Is there a way to allow the user to enter a custom value with the GridViewMultiComboBoxColumn or am I going about this all wrong?

Any pointers in the right direction would be greatly appreciated. Thanks!

6 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 05 Mar 2012, 05:59 PM
Hello Mike,

You can achieve that by extending the default behavior of RadMultiColumnComboBoxElement editor. I am enclosing a sample project which demonstrates how you can do it.

Greetings,
Svett
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Hans
Top achievements
Rank 1
answered on 19 Mar 2014, 02:09 PM
Is there anyway we can get the project for Visual Basic?
0
Hans
Top achievements
Rank 1
answered on 21 Mar 2014, 01:31 PM
Also, is there anyway I can allow the user to add any value, regardless if the value is in the list or not. It needs NOT to modify the source datatable. Just give the user the option to either enter their own value or use the list without modifying the underlying source data.
0
Dimitar
Telerik team
answered on 21 Mar 2014, 05:02 PM
Hello Hans, 

Thank you for writing.

I have converted and attached a Visual Basic version of the project. Also an example of how such behavior can be achieved is available in the following article: Allow end-users to add items to DropDownListEditor.

Please let me know if there is something else I can help you with. 

Regards,
Dimitar
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Hans
Top achievements
Rank 1
answered on 21 Mar 2014, 06:17 PM
Thanks for the response...and I've been looking at the said example for 2 days...found 2 errors (already reported)....but it doesn't work as I want it, and basically 'cause it modifies the dt from which the combobox sources it data.

This data...in my project...is a query from the systables object in SQL Server, which obviously i do not want to modify.

I just want the combo to suggest but let the user: either select a value or just type whatever they want. Nothing else.

However, the current behavior acts like it were readonly and doesn't save the keyed data and it actually clears the data, before moving on...leaving the field BLANK.     

Thanks!         
 
0
Dimitar
Telerik team
answered on 24 Mar 2014, 05:19 PM
Hi Hans,

Thank you for writing back.

Currently, this behaviour is not supported in neither GridViewComboBoxColumn nor GridViewMultiComboBoxColumn. By default, the grid is trying to match the entered value with the values contained in the data source. This is how this column work and this behaviour cannot be changed. 

Do not hesitate to contact us if you have other questions.

Regards,
Dimitar
Telerik

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
GridView
Asked by
mtaber
Top achievements
Rank 1
Answers by
Svett
Telerik team
Hans
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or