//Apply border style for header row
this.sfDataGrid1.Style.HeaderStyle.Borders.All = new GridBorder(GridBorderStyle.Dotted, Color.Blue, GridBorderWeight.Thin);
//Apply border for data row
this.sfDataGrid1.Style.CellStyle.Borders.All = new GridBorder(GridBorderStyle.Dotted, Color.Blue, GridBorderWeight.Thin);
//Apply border style for Left, Top , Right , Bottom for header row
this.sfDataGrid.Style.HeaderStyle.Borders.Top = new GridBorder(GridBorderStyle.Dotted, Color.Blue, GridBorderWeight.Thin); this.sfDataGrid.Style.HeaderStyle.Borders.Left = new GridBorder(GridBorderStyle.Dotted, Color.Red, GridBorderWeight.Thin);
this.sfDataGrid.Style.HeaderStyle.Borders.Right = new GridBorder(GridBorderStyle.Dotted, Color.Green, GridBorderWeight.Thin);
this.sfDataGrid.Style.HeaderStyle.Borders.Bottom = new GridBorder(GridBorderStyle.Dotted, Color.DarkBlue, GridBorderWeight.Thin);
//Apply border style for Left, Top , Right , Bottom for data row
this.sfDataGrid.Style.CellStyle.Borders.Top = new GridBorder(GridBorderStyle.Dotted, Color.Blue, GridBorderWeight.Thin);
this.sfDataGrid.Style.CellStyle.Borders.Left = new GridBorder(GridBorderStyle.Dotted, Color.Red, GridBorderWeight.Thin);
this.sfDataGrid.Style.CellStyle.Borders.Right = new GridBorder(GridBorderStyle.Dotted, Color.Green, GridBorderWeight.Thin);
this.sfDataGrid.Style.CellStyle.Borders.Bottom = new GridBorder(GridBorderStyle.Dotted, Color.Yellow, GridBorderWeight.Thin); |
Queries |
Solutions |
please check this! It seems that the description is incorrect. |
We are unable to understand your query. Can you please provide the more information related to your query. |
how i can format datagrid cell value in date,time,currency,number(...)? (this column contain multi value datatype) |
Your requirement can be achieved by using FormatMode Property in GridNumericColumn in SfDataGrid. Please refer the following user documentation for more details, UG Link: https://help.syncfusion.com/windowsforms/datagrid/columntypes#format-mode |