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

GridListControl Woes

Thread ID:

Created:

Updated:

Platform:

Replies:

19559 Sep 29,2004 05:32 AM UTC Sep 29,2004 05:59 AM UTC WinForms 1
loading
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 2.1.0.9.
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

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

;