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
345
A newbie's question: cell width 100% in WinGrid
posted

If I have 3 cloumns, the 1st & 3rd columns are fixed length,  how can make the 2nd column take all the space left?

Thanks for help!

Amy

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Amy,

    You can 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].Width = 100;
                band.Columns[0].MinWidth = 100;
                band.Columns[0].MaxWidth = 100;

                band.Columns[2].Width = 100;
                band.Columns[2].MinWidth = 100;
                band.Columns[2].MaxWidth = 100;

                layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
            }

Children
No Data