Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Vertical Grid Lines plus cell underline
posted

I have a grid that works like an excel worksheet.  I have turned the row border off.  I want to set the right side of each cell to have a border color of black.  This will cause a vertical line between each cell.  In addition some of these cells need to have their bottom border set as well.  How can I achieve this?  I am assuming I will have to use a DrawFilter but I have no clue how to do cell by cell filters.

Thanks

Parents
No Data
Reply
  • 23930
    Verified Answer
    Offline posted

    Hello,

     

    Yes, using draw filter is one of the ways to solve your issue. I implemented it by getting the BeforeDrawBorders phase from the GetPhasesToFilter method for every CellUIElement and then drawing its right borders. As for how to draw the bottom border of a specific cell, the CellUIElemnt has Row and Column properties, with which you can determine if that is the cell you need.

     

    I have attached a sample which demonstrates this approach. If you have any additional questions don’t hesitate to ask them.

    DrawFilterDrawRightBorders.zip
Children