Hallo,
I have a UltraGrid with multible bands. The DataSource is a collection of objects.
One band have two different child bands. I want to define the order of these two bands. Is there a way to define the position/order of the bands? I expect a way like the VisiblePosition-property for the column position.
My Infragistcs version is 6.1 and I'm using C#.
Hi,
This is a common request, and I know it's been discussed, but I can't remember if it was ever actually implemented or in which version.
VisiblePosition is exactly the property to use. A child band is really just a special kind of column on the parent band, so try accessing the columns that represent the child bands here and set the VisiblePosition on them and see if it works.
Thank you for you fast reply. I had exact the same idea:
e.Row.Band.Columns["UnitName"].Header.VisiblePosition = 0;e.Row.Band.Columns["ChildChargen"].Header.VisiblePosition = 1;e.Row.Band.Columns["ChildUnits"].Header.VisiblePosition = 2;
But it doesn't work. The VisiblePosition is set to the right order but it displays still the wrong order.
(Sorry for the bad english. I'm german)
The problem was because when I close my application, settings for my grid is saved. Next time application starts, settings loads and overlap mine.
I have NetAdvantage for .NET 2007 Vol. 3 CLR 2.0 and I the problem with VisiblePosition stay unsolved in this version. Can you confirm this?
I have a post here: http://ko.infragistics.com/community/forums/p/43447/376373.aspx#376373
It is associated with this problem.
Thank you,
I have done what you say and it works fine. For others, who have the problem:
My collection class implements ITypedList. In the GetItemProperty()-Method you have to return a PropertyDescriptorCollection. You can create your own PropertyDescriptor-class to define the propertys by your own.
The order is determined by the order in which the property descriptors are returned by the BindingManager. If you are implementing your own custom data source, you could implement ITypedList and override GetPropertyDescriptors to return the child band in a particular order. But this is probably more effort than it's worth, and to be frank, I'm not entirely sure the BindingManager actually honors the order, anyway.
I'm still having this problem.
Is there a way to modify my objects to get the right order? My Parentobject has 3 properties: Name (the orange cell) and two different collections.
How does Infragistics create the order of the columns/bands? And how can I affect the order at design time?