Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
945
Custom control derives from Infragistics.Win.UltraWinGrid.UltraGrid doesn't respect init value for Me.DisplayLayout.Override.CellClickAction
posted

I've created a class that derives from Infragistics.Win.UltraWinGrid.UltraGrid, and I'm trying to set Me.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect, but when the control is dropped on a parent, the value always ends up being EditAndSelectText.

Here is my code.  I've also tried it in the constructor with same results:

        Protected Overrides Sub InitLayout()
            Try
                MyBase.InitLayout()
                Me.DisplayLayout.GroupByBox.Hidden = True
                Me.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.[False]
                Me.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect
                Me.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti
                Me.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.[False]
                Me.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single 'default until set otherwise.
            Catch ex As Exception
                BSExceptionHandler.ProcessException(BSExceptionHandler.GetBSException(ex, BSExceptionHandler.GetThisMethodName))
            End Try
        End Sub

Parents
No Data
Reply
  • 29105
    Offline posted

    Hello, 

    The timing inwhich you are calling these properties appears to be too soon while the app is executing.

    CellClickAction defaults to EditAndSelectText when the control is dragged onto a form for the first time. And the code you have placed within InitLayout will not be called until the DataSource or Datamember of the grid is updated.

    I recommend waiting until the data is bound to the grid before updating these properties.

    Let me know if you have any questions regarding this matter.

     

Children