Drop down width grows for each call to ResizeToFit

Hello, I am using the GridControl v3.201.1.515. I have a cell type of "GridListControl" where I am dropping down a GridListControl. The datasource for dropped down list is a custom object collection, and to be able to control the column order I had to make this a virtual grid. Every thing works great, except I am unable to control the column widths of the dropped down grid. Using the code below I get close (except the last column is huge), but the problem is for everytime the grid is dropped down it keeps growing and growing in width. Note: it does not do this if the scrollbar is not displayed when the number of rows is less than or equal to the number of rows the grid shows. '''' CurrentCellShowingDropDown event handler Private Sub _showDropDown(ByVal e As Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs) Dim cr As GridDropDownGridListControlCellRenderer = DirectCast(CurrentCellRenderer(), GridDropDownGridListControlCellRenderer) cr.ListControlPart.ShowColumnHeader = False '''' Remove the handlers first. Dim grid As GridListControl = cr.ListControlPart grid.BeginUpdate() '''' REmove event handlers _resetDropDownGrid(cr.ListControlPart) '''' Add event handlers _addDropDownGridHandlers(grid) grid.EndUpdate() cr.ListControlPart.Grid.ResetVolatileData() grid.Grid.ColWidths.ResizeToFit(GridRangeInfo.Table) cr.ListControlPart.Grid.Refresh() End Sub Any help would be greatly appreciated. Thanks, Per

1 Reply

AD Administrator Syncfusion Team April 13, 2006 09:57 AM UTC

Hi Per, Here is a forum thread that shows how to hide columns/ size columns in a GridListControl dropdown. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19403 Let us know if this helps. Regards, Calvin.

Loader.
Up arrow icon