We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Changing gridline colour at runtime.

Thread ID:

Created:

Updated:

Platform:

Replies:

117654 Nov 24,2014 07:47 AM Nov 25,2014 12:58 AM Windows Forms 1
loading
Tags: GridControl
Ranjan
Asked On November 24, 2014 07:47 AM




How to change the colour of gridline at runtime?



Regards,
Ranjan VijayKumar.

Neelakandan Kannan [Syncfusion]
Replied On November 25, 2014 12:58 AM

Hi Ranjan,

 

Thank you for your interest in Syncfusion products.

 

If you want to change the GridLine color dynamically at run time, you can use Borders Property of TableStyle. By using this property you can set Left, Right, Bottom, Top border styles of grid. Please make use of below code and attached sample,

 

private void buttonAdv1_Click(object sender, EventArgs e)

{

this.gridControl1.TableStyle.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Red, GridBorderWeight.Thin);

this.gridControl1.TableStyle.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, Color.Red, GridBorderWeight.Thin);

}

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: Sample_GridLine_Changing_f753c48a.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;