Draw border around a group of cells

2 posts, 0 answers
  1. Lasse
    Lasse avatar
    21 posts
    Member since:
    Jul 2011

    Posted 22 Sep 2011 Link to this post

    Hi,

    I want to draw a border around a group of cells. There should not be any border in between the group, only around.
    Like highlighting a group. How can I achieve this?

    And when i draw a border around a cell, like shown in this post, the border to the right seem like its only one pixel wide, and the rest is 2 px.How can I avoid this. 

    Please take a look at the attached picture. I also painted an example of the border around a group that i want to make possible in code :)

    Regards
    Svein Thomas
  2. Stefan
    Admin
    Stefan avatar
    2908 posts

    Posted 27 Sep 2011 Link to this post

    Hello Svein,

    Thank you for writing.

    You can achieve this in the CellFormatting event handler. Simply set the left, top and bottom borders for the left cell with no right border; and right, top and bottom borders for the right cell with no left border, otherwise, reset the settings.

    Attached you can find a sample implementation.
     
    All the best,
    Stefan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top