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
785
RowLayoutStyle preventing column sizing...
posted

I have isolated what I believe to be:

1. a bug

2. the lack, on my part, to properly setting of the billion settings found on a grid

I'm guessing it is me.  That's typically what my wife says at any rate.

Problem:

When I:

            ultraGrid.DisplayLayout.Bands[0].RowLayoutStyle = RowLayoutStyle.None;
            ultraGrid.DisplayLayout.Override.AllowColMoving = AllowColMoving.WithinBand;
            ultraGrid.DisplayLayout.Override.AllowRowLayoutColMoving = GridBagLayoutAllowMoving.AllowAll;

            ultraGrid.DataSource = _bindingData;
            ultraGrid.DisplayLayout.AutoFitStyle = AutoFitStyle.ExtendLastColumn;


I can size columns, move them, but NOT stack them, etc.  Life is sort of good.  When I size the first few columns to be big enough to cause a horizontal scroll bar to appear and then scroll to the far right of the grid, I can STILL size, move, not stack, etc.  Life is still not bad.

When I change the first line to either:

            ultraGrid.DisplayLayout.Bands[0].RowLayoutStyle = RowLayoutStyle.ColumnLayout;

or

            ultraGrid.DisplayLayout.Bands[0].RowLayoutStyle = RowLayoutStyle.GroupLayout;

I can size columns, move them, and bonus ... stack them, etc.  Life is really good.  I like stacking columns.  When I size the first few columns to be big enough to cause a horizontal scroll bar to appear and then scroll to the far right of the grid, I can still size larger (but not smaller), move, and stack, etc.  Life stinks, it's not very good at all.

The bug here is that for some reason, the grid will allow me to size the columns bigger and smaller as long I do not have a horizontal scroll bar.  Once I get it and scroll, I will start to see columns that will only allow me to size them bigger but not smaller.

I need to stack columns and size both bigger and smaller.  Please advise.  Oh, I have this breaking in a test harness and if asked can upload it.  It is actually very easy to create:

  1. New form.
  2. Drop a grid on it.  Take all defaults, don't configure in the wizard.
  3. Anchor it.
  4. Create a data source of several columns.
  5. Bind.
  6. Set the settings above.
  7. Get yourself a scroll bar by making the columns big.

 

 

 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    What version of the grid are you using?

    I tried this out and I get the same results. There does seem to be a bug here, although I'm not entirely sure exactly what it is.

    If you set AutoFitStyle to ExtendLastColumn, it seems odd to me that making a column larger allows you to get a scrollbar at all. The whole point of using this style is that there should not be a scrollbar. On the other hand, if you make a column large enough such that the last column cannot be shrunk small enough to make everything fit, then I don't know what the grid could possibly do about it. Perhaps the grid should not be allowing you to make the column that large.

    Once you have extended the width to the point where you have a scrollbar, the AutoFitStyle property is ignored for the most part, but it appears to be causing a problem where you cannot make the columns smaller. So it looks like the grid should be ignoring the AutoFitStyle at this point, but it's not doing so 100% of the time.

    Either way, it seems that the grid is doing something wrong, so I'm going to forward this thread over to Infragistics Developer Support so they can write it up for developer review.

    You can tell you wife it wasn't you this time. :)

Children