Dear friends,
I wanted to make the column of my ultrawebgrid control to be automatically fit to the content. What property should i set or what do I need to do?
Thanks,
This worked for me:
In the designer, browse to ControlSettings -> UltraWebGrid -> DisplayLayout and set the following:
ColWidthDefault: -1px
RowWidthDefault: -1px
StationaryMargins: No
UseFixedHeaders: false
TableLayout: auto
This makes both columns and rows autofit to the contents. Note, that if TableLayout is not set to auto, *all* content disapears in FF if ColWidthDefault is set to -1px (seems to be an Infragistics bug - it works fine with RowWidthDefault set to -1px). Note that this will also remove scrollbars from the UltraWebGrid (browser scrollbars are still there, though) in IE and the left Infragistics scrollbar in FF.
TS Ngaihte said: I did not get what you mean. What I mean is the content of the cell in a column does not fit automatically, I need to manually resize the column width. Now I want the content of the cell fits automatically and visible all without any manual resize.
If you do not set a .Width property for a column, the default behavior is for the cell to expand as required to fit the contents.
You may also need to set the following:
Dear WombatEd,
I did not get what you mean. What I mean is the content of the cell in a column does not fit automatically, I need to manually resize the column width. Now I want the content of the cell fits automatically and visible all without any manual resize.
Thanks
You need to NOT set the column's .Width property.