Can anyone help me how to auto size the colums when the grid is loaded initially.
Thanks.
Hi Mike,
What do you mean of "The column header text should be taken into account when you call PerformAutoSize"?
I got a little confused about the sentance.
Thanks for your reply in advance,
Alfonzoe
Hi Cbvidya,
I also meet the same problem you talked above, and eager to know the solution, could post the detailed answer?
I don't know what the meaning of "called Caption first and then PerformAutoResize(). ".
I have tried using the following, but it doesn't works:
private void ugListing_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { foreach (UltraGridBand band in e.Layout.Bands) {
for (int count = band.Columns.Count - 1; count >= 0 ; count--) { band.Columns[count].PerformAutoResize(PerformAutoSizeType.AllRowsInBand); } } }
Thanks,
Yes..I called Caption first and then PerformAutoResize(). That fixed it.
The column header text should be taken into account when you call PerformAutoSize. Maybe you are setting the Caption on the column header fter you call PerformAutoSize?
Hi,
Thanks for the reply.
The columns are resized properly but the column headers are adjusted to the column size too. Is there any property to make the headers visible with PerformAutoResize property.
Thanks for the help.