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.

Changin columns width.

Thread ID:

Created:

Updated:

Platform:

Replies:

15326 Jun 16,2004 07:39 AM Jun 16,2004 08:23 AM Windows Forms 1
loading
Tags: GridControl
Andrey Plinda
Asked On June 16, 2004 07:39 AM

Is any way to change others columns width by changing one columns width? Event ColWidthsChanging fired only one time after releasing left mouse button. Best regards!

Administrator [Syncfusion]
Replied On June 16, 2004 08:23 AM

By default, if you have several columns selected, and then change the width of one column, the grid will normally change the width of all selected columns. If you want to do something else, then you could handle ColWidthsChanged. In you handler you could then change other colwidth from code using grid.Model.ColWidths[col]. (But you would want to set a flag and test this flag to make sure you avoid recursively calls to ColWidthChanged because you are changing colwidths in the event handler.
Private inColWidthsChanged As Boolean = False
    Private Sub GridControl1_ColWidthsChanged(ByVal sender As Object, ByVal e As GridRowColSizeChangedEventArgs) Handles GridControl1.ColWidthsChanged
        If Not inColWidthsChanged Then
            inColWidthsChanged = True
            ''set other colwiths....
            ''....
            ''...
            inColWidthsChanged = False
        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.

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.

;