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

GridTableElement and BorderPrimitive

1 Answer 166 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marek
Top achievements
Rank 1
Marek asked on 28 Aug 2007, 12:07 PM
We draw the border color on controls differently in order to show data state.  I use BorderPrimitive on the other controls to do this, but noticed that GridView does not do it this way.  Any reason for this? 
I therefore tried to use TableElement.BorderColor, BorderColor2, BorderColor3 and BorderColor4 to try and achieve the same result, but only got the right and bottom borders colored.  I also tried to use the BorderTopColor etc. properties, but these do not seem to have any affect.

Please could you advise.

Best regards

Marek

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 28 Aug 2007, 04:41 PM
Hi Marek,

Since RadGridView is a more complex control that would use many RadElements, we decided to minimize the number of elements used in grid we decided to implement a single element called GridVisualElement. This element unifies border, fill and text primitive in one element. To enable border painting use the DrawBorder property of GridVisualElement. GridVisualElement contains properties equivalent to the ones in the BorderPrimitive. All of them are prefixed with 'Border'

Here is some example on how to change programmatically the visual appearance of a cell:

cell.BorderGradientStyle = GradientStyles.Solid;
cell.BorderColor = Color.Red;


 
Sincerely yours,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Marek
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or