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

GridListControl Woes

Thread ID:





19559 Sep 29,2004 05:32 AM UTC Sep 29,2004 05:59 AM UTC WinForms 1
Tags: GridControl
Raul Rosenthal
Asked On September 29, 2004 05:32 AM UTC

I''m trying to resize the combo that drops down from a grid cell using the follwing code: private void gridControl1_CurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs e) { e.Size = new Size( gridControl1.ColWidths[1] + gridControl1.ColWidths[2], e.Size.Height ); } because the combo displays two columns and I want it to be aligned with the columns in the grid. Alas, it does not appear to work, or to work sometimes only. Moreover, the combo sports an horizontal scrollbar every other time it is displayed (i.e. The user opens the combo and the scrollbar is there. The next time the combo opens, no scrollbar. Next time it''s there again) Also, I''d like to be able to resize the columns in the combo to match the size of the columns in the grid, but don''t know how. Please note that I am still using v1.6.1.8, because I had licencing bugs with the latest version. Can you please help? Thank you. Raul Rosenthal SDB SpA

Administrator [Syncfusion]
Replied On September 29, 2004 05:59 AM UTC

You will also have to explicitly set the column widths within the embedded grid in the GridListControl. Here is code that worked for me in version
Private Sub gridControl1_CurrentCellShowingDropDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs)
	Dim cc As GridCurrentCell = Me.gridControl1.CurrentCell
	If Me.gridControl1(cc.RowIndex, cc.ColIndex).CellType = "GridListControl" Then
	Dim cr As GridDropDownGridListControlCellRenderer = cc.Renderer
	''cr.ListControlPart.AutoSizeColumns = False
	cr.ListControlPart.Grid.ColWidths(1) = Me.gridControl1.ColWidths(1) - 1
	cr.ListControlPart.Grid.ColWidths(2) = Me.gridControl1.ColWidths(2) - 1
	e.Size = New Size(Me.gridControl1.ColWidths(1) + Me.gridControl1.ColWidths(1), e.Size.Height)
	cr.ListControlPart.Grid.HScrollBehavior = GridScrollbarMode.Disabled
	End If
End Sub


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