This question was asked before, but I'll put it out there again.
How can we define the order of child bands? I have three child bands at the same level under a parent row. I would like to control the order that they appear under the parent.
I'm using Infragistics2.Win.UltraWinGrid.v8.1
A child band is really just a column in the parent band.
So you can try to order the child bands in the same way you order the other columns, by setting the column.Header.VisiblePosition.
I'm not sure if this actually works for Child Bands, though. If not, then the only other way would be to implement ITypedList on your data source and rearrange the columns that are returned from the data source.
If the Header.VisiblePosition does not work, you should submit a feature request to Infragistics. Request a Feature or Component
The child band columns do not show up in the Designer. Changing them at runtime has no effect on the child band ordering.
I did submit a feature request.
I will be examining the ITypedList as a solution.
Thanks,Mike
Just one other small point... what event did you use to set the VisiblePosition at run-time? You should probably use the grid's InitializeLayout event.
I moved the code to the grid's Initialize Layout and there was no change:
With Me.ugLineInformation.DisplayLayout.Bands(0) .Columns("FK_tblPecPoLine_tblPecPoLineGL").Header.VisiblePosition = 15 .Columns("FK_tblPecPoLine_tblPecPoLineReceipt").Header.VisiblePosition = 16 .Columns("FK_tblPecPoLine_tblPecPoLineExpedite").Header.VisiblePosition = 17End With
End Sub
Okay, just wanted to make sure. If that doesn't work, then I guess the grid doesn't do it.
If you reorder the bands in the data source, and then unbind and rebind the grid to it, the bands will be reordered in whatever order they are in the data source, and none of the settings for the grid will have been lost.
Well, if you look at any project using the controls, you can look at the project references and select any one of the Infragistics references and then check the PropertyGrid to see the complete version number.
If you are using VB, then the references for the project are hidden by default and you have to click on the Show All Files button above the project explorer.
Where can I go to determine which version of Infragistics I'm running?
Actually, that's no longer necessary. A VisiblePosition property was added to the Band in v9.2.