Recently I upgraded from asp.net 9.2 to asp.net 10.3 and since the upgrade the child rows in the UltraWebGrid are not displaying correctly. Before when a hierarchical report was expanded the child rows width was 100% of the page same as the parent row, currently when the report is expanded the grid looks like this.
http://img145.imageshack.us/img145/7562/gridsizeproblem.jpg
I have tried every width setting I can find and nothing fixes the problem. If anyone can be of assistance it would be greatly appreciated.
Hello ekolluri,
You may try to use “Unit.Percentage(<percent>)” instead of “Unit.Pixel()”, but if you are creating columns dynamically there will be very hard to set their width to match the size of the grid if its size is generated dynamically too.
If I find some other solution for your question I will inform you.
The solution you provided worked, the only problem is that the reports are generated dynamically so the user can have any number of columns in the grid. On top of the fact that they have different screen resolutions, it isn't feasible to use your solution. For now We've decided to leave it as is and let the user adjust the width if they want to by turning on column sizing. We'll continue to look for a work around, if there are any updates or hotfixes that allow child rows to be set by percentage please let me know.
Please let me know if you need further assistance with your question.
In what Internet Browser you test your page?
Did you tried to set the column width in the page load event like this:
public void SetWidth()
{
// parent band
<yourgrid>.Bands[0].Columns.FromKey("M1").Width = Unit.Pixel(60);
<yourgrid>.Bands[0].Columns.FromKey("M2").Width = Unit.Pixel(60);
…
// child band
<yourgrid>uwgAdjust.Bands[1].Columns.FromKey("M1").Width = Unit.Pixel(60);
<yourgrid>uwgAdjust.Bands[1].Columns.FromKey("M2").Width = Unit.Pixel(60);
}
You should than put this method in your page load event and do not do any other column resizing from other parts in your code.
Try this approach in your grid and let me know what the results are.
Even when setting the child bands columns to a set pixel it has no effect, it only affects the parent row.