SfDataGrid

Hi,

how can I define border-width, border-color(or separator line width and color) and margin for rows and columns?



1 Reply

AN Ashok N Syncfusion Team October 11, 2017 07:00 AM UTC

Hi Michael, 
 
Thanks for contacting Syncfusion Support. 
 
Query 
Answer 
Border-width 
In our SfDataGrid control we do not have support for customizing border width 
Border-color 
SfDataGrid allow to customize the style by writing a Style class overriding from DataGridStyle and assigning it to the SfDataGrid.GridStyle property.  
You can customize the border color by overring GetBorderColor method in custom DataGridStyle class. Please refer the below UG link for more details: 
Margin for rows and columns 
You can set the margin to GridColumn using GridColumn.TextMargin property, please refer the below UG link 
 
Also you can set the margin to Header text using GridColumn.HeaderTextMargin property, please refer the below UG link: 
 
In our SfDataGrid control we do not have margin support for rows.  
 
Regards, 
Ashok 


Loader.
Up arrow icon