Hi guys,
I seem to have a problem with the wingrid when I set the view type to multi band or something like that. Do check out these 2 image links:
http://img9.imageshack.us/img9/8803/62584980.jpg
http://img245.imageshack.us/img245/3039/32353380.jpg
I have set the autosize property to autosize all columns, but i can't understand why there's a scrollbar at the bottom when everything fits nicely on the grid. And when I scroll, all I see is an empty white space. This problem is only existant when I set the view type to multi band. The scrollbar doesn't show up in singleband view.
Please assist, thanks :)
From the screen shot, it appears that the columns in your grid do not fit within the available space. If you set AutoFit to ExtendLastColumn, the grid will only make the last column bigger, it won't make it smaller. So you might just need to set the Width on the last column smaller by default so that it will be stretched to fit the grid.
Also, it sounds like your data source is recursive. So the grid may be accounting for space in up to 100 bands of depth. Since the columns in each band are synchronized by default, your first column could end up being much larger than necessary to account for the indent on each level.
You might want to set AllowColSizing to free so that the columns are not synchronized. And you may also want to try setting MaxBandDepth to a more reasonable number, like between 5 and 8, instead of the default of 100.
Just to add, this is how I bind my grid:
I have a list of objects stored in a List<>, and within each object, there's a property referencing another List<>, which is the sub grid.