I have a grid that has two bands.
I've set the Selection Overlay and it works great on Band(1). Border shows just great.
However in Band(0) the SelectionOverlayColor is visible, but the Border is not.
Thoughts?
Dan
Hi Dan,
The border will not display if the selection is not contiguous or not rectangular. So if you select 2 rows in the parent band and those two rows are separated, either because they are not contiguous, or by some child rows (because the first selected parent row is expanded), then the border will not show up.
Ok thanks!
Quick observation though, My parent rows are NOT expanded. But I do have a little bit of before and after spacing. Would that cause the border not to display?
And this is kind of open ended... you think it would be possible to force the border with some kind of draw filter? (Not sure it is worth the effort thought<G>)
danhsoho said:Quick observation though, My parent rows are NOT expanded. But I do have a little bit of before and after spacing. Would that cause the border not to display?
Yes, that would certainly do it. Any kind of spacing like RowSpacingBefore or RowSpacingAfter would prevent the borders from being drawn.
danhsoho said:And this is kind of open ended... you think it would be possible to force the border with some kind of draw filter? (Not sure it is worth the effort thought<G>)
Is it possible? Yes.
But I can't say whether it would be worthwhile or not. It depends how complex your situation is. I can tell you from experience that the code within the grid that draws the borders is surprisingly complex. But on the other hand, the grid has to account for lots of different situations and options. You have the advantage of knowing what options your application is actually using, so your implementation of a DrawFilter could be more narrowly focused on just what you need.
Thanks Mike,
After I posted this I did go back in and set my spacing back to 0 and the borders did show. What's cool is that if I make a selection in the top band and then expand one of the rows in the band, the selection box, splits AND shows up.
In my humble opinion not having it show up with you have a litte row spacing seems a bit odd.
Hi,
danhsoho said:In my humble opinion not having it show up with you have a litte row spacing seems a bit odd.
I agree that that would be odd... but I just tried it out and I can't get this to happen. If I have a multi-band grid and I select two adjacent rows, the SelectionOverlayBorder encompasses both rows. But as soon as I expand the first row, and thus create a split between the rows, I no longer get the overlay border, although I do still get the overlay.
I think we do this because it's what Excel does. They stop showing a border once the selection is non-rectangular or non-contiguous.