Specifying Min and Max column widths

Answered (Not Verified) This post has 0 verified answers | 4 Replies | 4 Followers Thread's RSS feed.

PNI Digital Media
Points 737
Replied On: Mon, Mar 16 2009 8:14 PM Reply

I have created an UltraWinGrid with several columns and they populate and draw OK, but the widths make no sense. Several columns are so narrow on the screen their contents are cut off, while the column third from the end takes up nearly half the grid's width. I cannot resize columns consistently; dragging the vertical bar between the column headers only allows resizing by a few pixels left or right except for the wide column, that I can resize right off the window. Dragging the right edge of the wide column's header past the right edge of the grid, or even the application window containing the grid, draws over top of other apps or the Windows desktop!

I have opened the UltraWinGrid Designer dialog, selected the Band and Columns settings, and set the Width property of the columns appropriately. No effect. Just for giggles, I set the Width property of the wide column to half that of the other columns. No effect, it's still bigger than all other columns and can be resized off the grid. When I let go after dragging the wide column, it redaws with some random width still larger than any other column in the grid.

How can I control the drawn width of the columns in a grid?

  • Post Points: 20

All Replies

pisceswzh
Points 455
Answered (Not Verified) Replied On: Mon, Mar 16 2009 10:44 PM Reply
Suggested by pisceswzh

I think you can set the exact pixal of width of each column, but according to your description, I think you need to first set the DisplayLayout.AutoFitStyle property to None and then set the Width property of each column under DisplayLayout.Bands(0).Columns(x).

  • Post Points: 20
Mike Saltzman
Points 464,890
Infragistics Employee
Replied On: Tue, Mar 17 2009 10:04 AM Reply

AutoFitStyle might be part of the problem. But it also sounds to me like you are using an old version of the grid. You might want to check and see if there is a hot fix available.

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 20
PNI Digital Media
Points 737
Replied On: Fri, Mar 27 2009 2:28 PM Reply

Thanks guys. I had UltraWinGrid 7.3.20073.1041 and there was a hotfix to 7.3.20073.1049 available. I installed this, but I still see the same behavior.

I do have DisplayLayout.AutoFitStyle.ResizeAllColumns set. When I changed that to .None *ALL* the columns are now too small, data is still cut off, there is a huge blank area after my last column and before the end of the grid, and I still get the crazy column resizing behavior. This is worse.

  • Post Points: 20
Mike Saltzman
Points 464,890
Infragistics Employee
Replied On: Fri, Mar 27 2009 4:52 PM Reply

If you can't even size the columns correctly with the mouse, then something is wrong. I thought that issue was fixed. But perhaps it's fixed in a later release. v7.3 is no longer being updated.

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 5
Page 1 of 1 (5 items) | RSS