Hi,
I have grid with two bands, I want to set the column width for each column based on the length of each column during run time. Is there any way I can do it for both the bands.
Regards
Sudarsan C.R
Hi Jit,
You can implement this requirement by calling CalculateAutoResizeWidth on the Column instead of using PerformAutoResizeColumns from the DisplayLayout. CalculateAutoResizeWidth returns the width that would be used if the column were autosized. After calculating this with, you can set the width of the column to that value or to 100, whichever is smaller.
Please let me know whether this works for you.
There are different approaches to solve this task. Which are they?
I have dynamic table/query .
Can we assign default width should be auto but no more than 100 by default.
I user want they can make it narrow or wider column width .
Hello Sudarsan,
There are different approaches to solve this task. One possible solution could be if you are using :
this.ultraGrid1.DisplayLayout.Override.AllowColSizing = Infragistics.Win.UltraWinGrid.AllowColSizing.Free;
this.ultraGrid1.DisplayLayout.PerformAutoResizeColumns(true, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand, true);
Let me know if you have any questions.