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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Combo in grid in cell

Thread ID:





31073 Jun 29,2005 06:11 PM UTC Jun 30,2005 02:18 PM UTC WinForms 7
Tags: GridControl
Martin Cyr
Asked On June 29, 2005 06:11 PM UTC

I''m trying to get a combobox typed cell in a grid-in-a-cell to display, let''s say the full name of a person when dropped down and only its number when closed. How should I do that?

Administrator [Syncfusion]
Replied On June 29, 2005 07:24 PM UTC

So, in the drop list, you want to see full names, but in the textbox portion of the cell, you want to see something else? Here is what I would try first. Set you your combobox cell style to use a style.DataSource, style.DataMember and Style.ValueMember. This way your values in the grid will be style.ValueMember type objects, and the display in teh grid will show the style.DisplayMember object. Then to get the textbox portion to display teh ValueMember instead of the DisplayMember, in the DrawCellDisplayText event, set e.Text = e.Style.Text.

Martin Cyr
Replied On June 29, 2005 07:38 PM UTC

I already did set the Display and Value Members, but I can''t find the value, only the display. Text, FormattedText and CellValue all points out to the display member...

Administrator [Syncfusion]
Replied On June 29, 2005 07:51 PM UTC

Here is a little sample showing what I described. http://www.syncfusion.com/Support/user/uploads/GDBG_GLC_78d853d9.zip

Martin Cyr
Replied On June 30, 2005 01:58 PM UTC

Again, I did that, the only difference is that I need it in a Grid-in-a-cell. Here''s what I did, if you can tell me why it''s not working... =\ Btw, it''s in VB.NET, so if it''s a problem, just say and I''ll try to convert to C#... GridTest_2868.zip

Martin Cyr
Replied On June 30, 2005 02:12 PM UTC

And also, how could I add more than one "inner grid" to the cell? Or should I divide the cell? Or perhaps just merge the headers? (I need 2x2 inner grids in each cell)

Administrator [Syncfusion]
Replied On June 30, 2005 02:13 PM UTC

When I run your sample, as soon as I click off the cell (in the inner grid), then value member is shown. I am using If you want to see it as soon as the dropdown closes, then you can override OnCurrentCellCloseDropDown in the embedded grid class and end the edit at that point. Protected Overrides Sub OnCurrentCellCloseDropDown(ByVal e As Syncfusion.Windows.Forms.PopupClosedEventArgs) Me.CurrentCell.EndEdit() End Sub

Martin Cyr
Replied On June 30, 2005 02:18 PM UTC

Argh, you got me on that one, sorry, I didn''t try changing cell :) Now for the 2x2 inner grids... Thanks a lot Clay


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon