Dear Infragistics,
I'm using the hierarchical capabilities of the UltraGrid. Imagine I have 2 bands. Persons with 1 to many Orders. My problem is that the columnsizes can't be resized independantly from eachother. I'd like for instance a certain column of Order to span 2 columns of it's parent Person.
Can this be done with UltraGrid and how?
Hi,
Do you want the columns to size completely independently of the other bands? Or do you want columns in one band to span across a specific number of columns in the other band?
You can do either one, but they are two different things.
For the former, you do this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridOverride ov = layout.Override; ov.AllowColSizing = AllowColSizing.Free; }
For the latter, you would do something like this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; band.Columns[0].ColSpan = 2; }
Hello,
I apologize for being vague. The 2nd example is what I ment, but (to be honest) the 1st example is even better in my case! So thank you for doing the extra work by working out two examples.
Thank you very much.
Gr.,
Danny