X - Looking for controls have borderlinestyle similar to list sfdatagrid gridlinestyle?

Hi,
I need to use a control that can be displayed linestyle(border,..) as gridlinestyle of sfdatagrid (dot, dashdot, continue, ..)  please help me one or if possible please show me how to draw them.
Note: there must be no missing border type and can be as simple ex: sfbutton, textbox, .. not complicated as grid control, spreadsheet, ..
I want to show 4 edges: top, left, right, bottom/ 
Thanks you!

8 Replies 1 reply marked as answer

VS Vijayarasan Sivanandham Syncfusion Team June 26, 2020 03:56 AM UTC

Hi Khanh Dang,

Thank you for contacting Syncfusion support.

Your requirement can be achieved by using GridBorderStyle in Border Property. Please refer the below code snippet, 
 
//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);

 

For more information, please refer the below UG link,

UG Link:  https://help.syncfusion.com/windowsforms/datagrid/styling#changing-the-color-and-thickness-of-the-gridlines

https://help.syncfusion.com/windowsforms/datagrid/styling#changing-the-style-of-gridlines

If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further.

Regards,
Vijayarasan S




TG The GridLock June 26, 2020 03:04 PM UTC

Hi Vijayarasan  please check this! It seems that the description is incorrect.


Also, how i can format datagrid cell value in date,time,currency,number(...)? (this column contain multi value datatype)


VS Vijayarasan Sivanandham Syncfusion Team June 29, 2020 04:54 PM UTC

Hi Khanh Dang ,

Thanks for the update.

Please find answer for your queries below 
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

 

Regards,
Vijayarasan S

 



TG The GridLock June 30, 2020 07:39 AM UTC

Hi Vijayarasan ,
query 1: may be description for list enum not correct.
query 2: I will try it.


VS Vijayarasan Sivanandham Syncfusion Team July 1, 2020 04:50 PM UTC

Hi Khanh Dang,

Thanks for the update.

We have consider your suggestion enum description contains wrong information, and we will made changes in the API reference and it will reflect in our Volume 2 SP release which is expected on end of July 2020. We will let you know once the changes have been reflected.

Regards,
Vijayarasan S 
 



VS Vijayarasan Sivanandham Syncfusion Team November 6, 2020 08:42 AM UTC

Hi Khanh Dang,

Thank you for your patience.

We have modified the false information in API reference and changes as reflected in API reference link. Please refer the below API link for your reference,

API Link: https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.Styles.GridBorderStyle.html 
We hope this helps. Please let us know, if you require further assistance on this. 
Regards,
Vijayarasan S 


Marked as answer

TG The GridLock November 6, 2020 03:30 PM UTC

đồng ý Vijayarasan ,


VS Vijayarasan Sivanandham Syncfusion Team November 9, 2020 06:17 AM UTC

Hi Khanh Dang,

 
Thanks for the update. 
 
Please let us know if you have any further queries on this. We are happy to help you😊. 
 
Regards, 
Vijayarasan S 


Loader.
Up arrow icon