This is a migrated thread and some comments may be shown as answers.

Draw border around a group of cells

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lasse
Top achievements
Rank 1
Lasse asked on 22 Sep 2011, 12:20 PM
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

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 Sep 2011, 07:52 AM
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 >>

Tags
GridView
Asked by
Lasse
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or