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

combobox functionality in databound grid vs dropdown

Thread ID:





8181 Oct 24,2003 03:52 PM UTC Mar 12,2004 05:11 PM UTC WinForms 4
Tags: GridControl
Andy Ullman
Asked On October 24, 2003 03:52 PM UTC

Hi, My databound grid is bound to a table that has a column account_cd. When the user selects that column, I use the combobox functionailty to display all the valid account_cd's from the child table. Some of the account_cd's are of type "A" and some "B", and it is imperative that the user see what the types are in the listbox portion of the combobox (preferably with the "A" and "B" icons that I have). It looks like I should not use a combobox, but rather the dropdown gridlistcontrol. Do you agree? If so, how do I access the properties of the gridlistcontrol (so that I can hide the column headers, grid lines etc. to make it look more like a combobox)? Thanks Andy

Administrator [Syncfusion]
Replied On October 24, 2003 09:53 PM UTC

If you want to see icons, then a GridListControl celltype would be the way to go. If you only have a single list you are using for all your cells, then you can set these properties once in FormLoad. But if you have several GridListControl cells using different lists, then you would have to conditionally set these properties in CurrentCellShowingDropDown. //in Form.Load GridDropDownGridListControlCellRenderer cr = this.gridControl1.CellRenderers["GridListControl"] as GridDropDownGridListControlCellRenderer; cr.ListControlPart.Grid.Properties.DisplayHorzLines = false; cr.ListControlPart.Grid.Properties.DisplayVertLines = false; cr.ListControlPart.Grid.Cols.Hidden[1] = true; cr.ListControlPart.ShowColumnHeader = false;

Greg Shomette
Replied On March 12, 2004 03:16 PM UTC

This worked great to hide columns and set column widths in our cell gridlistcontrol. But other cells in the grid have monthcalendar controls. These don''t respond to mouseclicks anymore. The calendar does not popup. I narrowed it down to creating the renderer object: Dim cr As GridDropDownGridListControlCellRenderer = cc.Renderer So, is there something we need to set specifically for the calendar controls now that we''re using the renderer? Thanks

Administrator [Syncfusion]
Replied On March 12, 2004 03:43 PM UTC

Yes, you only want to do this for GridListControls. So, maybe put your code in an if-block(, or check the col if you know it). If me.Grid(cc.RowIndex, cc.ColIndex).CellType = "GridListControl" Then ''... ''... End if

Greg Shomette
Replied On March 12, 2004 05:11 PM UTC

Thanks! That did it. I appreciate your speedy response.


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