Editable values for new row using GridViewMultiComboBoxColumn?

7 posts, 0 answers
  1. mtaber
    mtaber avatar
    12 posts
    Member since:
    Oct 2006

    Posted 29 Feb 2012 Link to this post

    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!
  2. Svett
    Admin
    Svett avatar
    728 posts

    Posted 05 Mar 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Hans
    Hans avatar
    3 posts
    Member since:
    Mar 2014

    Posted 19 Mar 2014 Link to this post

    Is there anyway we can get the project for Visual Basic?
  5. Hans
    Hans avatar
    3 posts
    Member since:
    Mar 2014

    Posted 21 Mar 2014 Link to this post

    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.
  6. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 21 Mar 2014 Link to this post

    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.

     
  7. Hans
    Hans avatar
    3 posts
    Member since:
    Mar 2014

    Posted 21 Mar 2014 Link to this post

    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!         
     
  8. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 24 Mar 2014 Link to this post

    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.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready