Hi,I have 2 bands in the ultraGrid.When I set the width of the columns in the second band, the columns still occupy the total space.I am doing everything during runtime..I need to be able to set the width of the columns in the 2nd band.Regards,Sid.
If the column widths are automatically shrinking to fit the width of the grid, it's because something in your code is changing it - this is not the default behavior of the grid.
You are probably setting AutoFitStyle or loading a layout in your grid.
Hello keerti,
Could you please try only with the 'Width' property on the column, like this:
...Bands[0].Columns[0].Width = 300;
I could also make a sample project for you. Please let me know of the result.
Hi Mike,
I have a ultragrid with a parent and a child band. The datasource is a BindingList. Shown below is a screenshot of the grid. I want to set a width for the columns in the band 2 as there are more number of columns . I tried setting the column widths to some large numbers but still the columns adjust to the grid's width. As mentioned in previous posts i tried the band.override.DefaultColWidth and AllowColResizing technique but no luck. Would be great if you could provide some solutions.
Regards,
keerti
Hi SId,
Oh, then you need to set the AllowColSizing property to one of the Free setting like Free or AutoFree.
By total space I mean the same width that the first band occupies.I want to be able to set the width of columns in the second band.
Regards,Sid.