Hello,
I use a drawFilter to draw some borders of my UltraGridCells. As said in this 'HowTo' http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=8487, I can't trap CellUIElement or RowUIElement because some parts of the border are drawn by adjacent objects. So i use the AfterDrawElement phase of a RowColRegionIntersectionUIElement, an element which contains all of the rows and cells in the grid.
The problem is that this element probably contains the scrollbars as well. The grid's scrollbars are overriden by borders drawn by the drawFilter.
Is there an element which contains rows and columns only ? Or is it possible to disable scrollbars, then create a scrollbar, put it next to the grid and control the grid with this scrollbar.
The scrollbars I am referring to are card area scrollbars, and I figured I could not create my own scrollbar to control the cards because the card area scroll position is not exposed.
http://www.infragistics.com/community/forums/t/68443.aspx
So I just expect an idea on how to use the drawFilter properly.
In the method DrawBorders of the UIElementDrawParams, the last parameter is 'clipRect'. Nothing is drawn outside of this area.
So I do something like this :
Rectangle invalidRect = _grid.DisplayLayout.UIElement.GetDescendant(typeof(RowColRegionIntersectionUIElement)).Rect; invalidRect.Inflate(-10,-10); // To not override scrollbars invalidRect.Offset(-10,-10);
drawParams.DrawBorders( UIElementBorderStyle.Solid, sides, Color.Black, Color.Black, cellRect, invalidRect);
It may not help anybody, so you can delete all my replies.
Sorry.
Hello Alexis,
Thank you for posting in our forums!
I am glad that you managed to solve your issue. Also you can try my approach related to it. Please refer to the attached zip archive on the bottom of this post.
Let me know if you need any further assistance or I am missing something.
Thank you, your sample is great.