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.

Combobox Cell With DataSource Question

Thread ID:





29839 Jun 3,2005 04:21 PM Jun 3,2005 10:35 PM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On June 3, 2005 04:21 PM

I have a GridControl that has a column whose CellType is set to "ComboBox" and to which is bound a Collection of objects. i.e.: .ColStyles(COLINDEX).CellType = "ComboBox" .ColStyles(COLINDEX).DataSource = myCollection .ColStyles(COLINDEX).DisplayMember = "Name" .ColStyles(COLINDEX).ValueMember = "ID" .ColStyles(COLINDEX).ExclusiveChoiceList = True Now, when a user selects an item in a cell''s drop-down list, how can I get the object that the displayed text in the cell represents (i.e. something akin to a SelectedItem property)? Or is that not possible?

Administrator [Syncfusion]
Replied On June 3, 2005 10:35 PM

If you set the .ValueMember = Nothing, then the grid(row,Col).Cellvalue should return the object. You can see a sample for this some of teh comboxes you see in \Syncfusion\Essential Studio\\Windows\Grid.Windows\Samples\CellTypes\ComboboxCells.


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.