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.
Unfortunately, activation email could not send to your email. Please try again.

Set a value to a combobox in a gridControl

Thread ID:





31470 Jul 7,2005 01:22 PM Jul 7,2005 04:10 PM Windows Forms 3
Tags: GridControl
Asked On July 7, 2005 01:22 PM

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 !!

Administrator [Syncfusion]
Replied On July 7, 2005 01:58 PM

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.

Replied On July 7, 2005 02:08 PM

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.

Replied On July 7, 2005 04:10 PM

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 !!!


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.