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

Changin columns width.

Thread ID:





15326 Jun 16,2004 11:39 AM UTC Jun 16,2004 12:23 PM UTC WinForms 1
Tags: GridControl
Andrey Plinda
Asked On June 16, 2004 11:39 AM UTC

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 12:23 PM UTC

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


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