We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set a value to a combobox in a gridControl

Hi, I fill a dropdown list in a gridControl by a dataTable. My display member is number + description. So when the user select the item in the dropdown list I only want to the number. How I can use my dataTable for that ?? thanks !!

3 Replies

AD Administrator Syncfusion Team July 7, 2005 05:58 PM UTC

So, you want your DropDown to display something other than the DisplayMember. Is this correct? I would probably try adding an Expression column to your datatable, and set teh expression ot concatentate the ValueMember and DisplayMember into teh string you want to see in the droplist. Then when you set the style.DisplayMember, set it to this Expression column.

MA Marie-Eve July 7, 2005 06:08 PM UTC

Not exactly, so for exemple in my drop list I see : 99999 - General Departement, and when the user select an item I see only 99999. My value member is the ID of the description in the database. In fact I want to modify the display member of my drop list after a current cell changed !!! I wish that with my exemple is more easy to understand !!! Thanks a lot.

MA Marie-Eve July 7, 2005 08:10 PM UTC

So finaly I used a grid in a drop list and it''s work very well. I only must hide some columns and it''s gonna be work as I want !!!

Live Chat Icon For mobile
Up arrow icon