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

border for GridViewColumn

2 Answers 162 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Minal
Top achievements
Rank 1
Minal asked on 26 Jun 2012, 05:40 PM
I am using Radgridview which has AutoGenerateColumns= "true" and binding it to a Datatable. Now based on conditions I have to add a border around the entire column red/green/blue. Different columns can have different colored border. Can you please suggest an approach to it.

2 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 29 Jun 2012, 11:37 AM
Hello Minal, 

 You can predefine GridViewCell's template, in order to modify the "PART_CellBorder" border's BorderBrush. By default it is bound to GridViewCell's VerticalGridLinesBrush property, which is not publicly settable. Then you can propagate the new template with a style, using a CellStyleSelector for the separate columns.

Regards,
Ivan Ivanov
the Telerik team

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

0
Minal
Top achievements
Rank 1
answered on 03 Jul 2012, 11:57 AM
Thanks Ivan.
I am quite new to WPF, so if you can provide a sample code then I can understand the Properties and customize it as required.
Tags
GridView
Asked by
Minal
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Minal
Top achievements
Rank 1
Share this question
or