Columns appears when resizing header

Aug 27, 2009 at 1:34 PM

Hi!

I've got table with one header with colspan != 1:

grid1.Redim(5, 5);

            grid1[0, 0] = new SourceGrid.Cells.ColumnHeader("H1")
            {
                ColumnSpan = 5
            };

            for (int i = 1; i < 5; i++)
                for (int g = 0; g < 5; g++)
                    grid1[i, g] = new SourceGrid.Cells.Cell(i.ToString() + ":" + g.ToString());

            grid1.Columns[1].Visible = false;
            grid1.Columns[4].Visible = false;

When I am trying to resize header, columns 1 and 4 magically appears!

Aug 27, 2009 at 11:13 PM

Since those columns are not visible, try setting their widths to 0.  You can restore the widths if/when you make them visible.

Hope this helps.

Aug 28, 2009 at 7:38 AM

Unfortunately changing widths does not help. When resizing header, all columns widths are set to average.

Sep 1, 2009 at 3:57 PM

You can stop resize header like this

 SourceGrid.Cells.ColumnHeader header = new SourceGrid.Cells.ColumnHeader();
 header.ResizeEnabled = false;

I hope this help you

 

Coordinator
Sep 3, 2009 at 8:38 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.