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.
Syncfusion Feedback

Drop down width grows for each call to ResizeToFit

Thread ID:

Created:

Updated:

Platform:

Replies:

43052 Apr 12,2006 04:39 PM UTC Apr 13,2006 09:57 AM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 12, 2006 04:39 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

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.

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

;