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

AllowCustomText

1 Answer 53 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 06 Nov 2014, 12:01 AM
In the UI for ASP.Net, the drop down control has an option 'AllowCustomText' which seems to be what I need for the UI for WinForms.  My users want to be able to select an item from a drop down box or type in a value that is not in the list.  I do not want the value they enter to be saved in the list.  Right now, when I set the drop down to 'DropDown' (as opposed to DropDownList) the user can edit the text, but as soon as they tab off the cell, it replaces what they typed with the nearest entry in the drop down.

I have seen some threads that discuss solutions, but they seem so cumbersome and all of them have the typed in value being added to the drop list.

Isn't there an easier way to implement this functionality?  (I'm on UI for WinForms 2014 Q1)

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Nov 2014, 03:43 PM
Hello Jay,

Thank you for writing.

Following your description, I suppose that you use a GridViewComboBoxColumn. When this column is in bound mode, the DisplayMember property represents the column of the DataSource that should be displayed in the drop down list. The ValueMember property specifies the column of the DataSource that should be used to update the cell within the grid represented by the FieldName property. Hence, the grid cell expects the new value to be a valid record from the DataSource. Note that RadDropDownListEditor requests the selected value to be present in the RadDropDownListEditorElement.Items collection. All other values are not considered to be valid. That is why the user typed value should be inserted in the list. You can refer to our Allow end-users to add items to DropDownListEditor help article on this topic.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Jay
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or