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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set a value to a combobox in a gridControl

Thread ID:





31470 Jul 7,2005 05:22 PM UTC Jul 7,2005 08:10 PM UTC WinForms 3
Tags: GridControl
Asked On July 7, 2005 05:22 PM UTC

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

Replied On 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.

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


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon