Hello,
We are using collections as datasource to ultrawingrid. How to display data hierarchically in ultagrid for a collection based datasource. we could achive this by using dataset & datarelation. But need to achieve the same with non dataset based datasources.
Thanks,
Hi,
The band Key comes from the data source and cannot be changed in the grid.
You can change the Caption of the band header which is displayed to the user, but not the Key.
Hey Mike,
I am binding the collection to ultrawingrid with 3 level hierarchy and am looking to change the band names for these levels, as the first level band name is getting a wierd name as List`1 to some meaningful name.
Could you please help me on this.
Thanks In Advance
As i was trying to access the bands[2] rather than in InitializeEvent, it is not able to identify bands[2].
It worked good when i set the option in the event.
Thanks For the Reply..
What's the exception?
If you can see Bands[1] at run-time, but are getting an IndexOutOfRange Exception when trying to access in code, the most likely reason is that you are just doing it too early - before the grid has created the band.
An easy way to avoid that is to use the InitializeLayout event of the grid to do any kind of layout and formatting you need:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; layout.Bands[1].Columns["My Column"].Header.Caption = "My Caption"; layout.Bands[1].Columns["My Column"].Width = 200; }
hi Mike,
I added a collection and able to get the hierarchy representation of the data, thanks for that.
Could you please let me know how to change the column display name and width of the column in the heirarchy collection... when i did try to access band[1] thrwing exception as out of range exception.
Please do help on this..Awaiting for some light on this issue.