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
195
When is the VisiblePositionWithinGrid property set?
posted

I have a WinGrid on a form which does not have any data bindings until the form is loaded at run time. on the Form1_Load event I am trying to add two unbound columns to the first band in the grid.

Dim UltraGridColumn6 As New Infragistics.Win.UltraWinGrid.UltraGridColumn("ucStart", 1)

With UltraGridColumn6

  .AutoEdit = False

  .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly

  .Header.Caption = "Overall Start"

  .Header.VisiblePosition = 3

End With

Me.UltraGrid1.DisplayLayout.Bands(0).Columns.Add(UltraGridColumn6)

This ultragrid overrides the OnEnter event and tries to get the first visible, non-disabled ultra grid cell for determining the tab stop by using the VisiblePositionWithinBand property of the ColumnHeader object for each column.

Unfortunately, this property is not set to an instance of a reference by the time this code is hit?

Am I trying to add a column in the wrong way, or can I call a method so that this VisiblePositionWithinBand property is set?

The extra trouble that I am running into is that VisiblePositionWithinBand is read only and cannot be modified.

Any suggestions?