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

combobox functionality in databound grid vs dropdown

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

4 Replies

AD Administrator Syncfusion Team 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;

GS Greg Shomette 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

AD Administrator Syncfusion Team 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

GS Greg Shomette March 12, 2004 05:11 PM UTC

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

Live Chat Icon For mobile
Up arrow icon