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
1365
How to span columns?
posted

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?

Parents
  • 469350
    Verified Answer
    Offline posted

    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;
            }

Reply Children
No Data