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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disabling frozen col/rows indication

Thread ID:





6679 Aug 22,2003 05:45 AM UTC Aug 25,2003 12:04 PM UTC WinForms 8
Tags: GridControl
Asked On August 22, 2003 05:45 AM UTC

If I freeze the first column and the two first rows I get some wierd blue lines. If I disable frozen the frozen cells the lines go away. See the (mangled, sorry) screenshot. How can I disable them or make them the same color as the background ? Thanks.

Administrator [Syncfusion]
Replied On August 22, 2003 06:00 AM UTC

You can change the color of that line using this property, but you cannot remove it entirely. this.gridControl1.Properties.FixedLinesColor

Replied On August 22, 2003 06:22 AM UTC

Could you file that as a feature request ? Thanks.

Administrator [Syncfusion]
Replied On August 22, 2003 09:40 AM UTC

You can make this border anything you like by handling QueryCellInfo, and in the handler if e.ColIndex points to your frozen column, then set e.Style.Border.Right = new GridBorder(....); to have teh border you want to see.
private void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
	if(e.ColIndex == this.gridControl1.Cols.FrozenCount&& e.RowIndex > 0)
		e.Style.Borders.Right = new GridBorder(GridBorderStyle.Dotted, SystemColors.ActiveCaption);//, GridBorderWeight.Thin);

Replied On August 25, 2003 06:26 AM UTC

I was able to generate some fun results using the code below. But the frozen cell lines was still drawn on top. Changing the colors to white, didn't help. I am using the wierd colors to make it clearer. See the screenshot. Also I am still on 1.5 - does the tip solve it on 1.6 ? void GridQueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if (e.RowIndex > 0 && e.ColIndex > 0) { e.Style.CellType = "Static"; if( e.ColIndex == this.gridControl1.Cols.FrozenCount ) { e.Style.Borders.Right = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.DeepPink );//, GridBorderWeight.Thin); } if( e.ColIndex == this.gridControl1.Cols.FrozenCount+1 ) { e.Style.Borders.Left = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.DeepSkyBlue );//, GridBorderWeight.Thin); } if( e.RowIndex == this.gridControl1.Rows.FrozenCount+1 ) { e.Style.Borders.Top = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.DeepPink );//, GridBorderWeight.Thin); } if( e.RowIndex == this.gridControl1.Rows.FrozenCount ) { e.Style.Borders.Bottom = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.Orange );//, GridBorderWeight.Thin); }

Replied On August 25, 2003 06:44 AM UTC

Just tested -- upgrading didn't solve it. It is not a major issue (yet) since it seems that I am the only person who have noticed the glitch.

Administrator [Syncfusion]
Replied On August 25, 2003 07:00 AM UTC

I was able to get rid of the frozen lines by turning off the gridlines, and having the cell's draw the borders. You do not have to use QueryCellInfo. Attached is a little sample. (The grid's default drawing only draws the bottom and right borders, so normally you do not have to set the top and left borders).
public Form1()

	this.gridControl1.Rows.FrozenCount = 1;
	this.gridControl1.Cols.FrozenCount = 1;

	gridControl1.TableStyle.Borders.Right = new GridBorder(gridControl1.DefaultGridBorderStyle, SystemColors.ActiveCaption);
	gridControl1.Properties.DisplayVertLines = false;

	gridControl1.TableStyle.Borders.Bottom = new GridBorder(gridControl1.DefaultGridBorderStyle, SystemColors.ActiveCaption);
	gridControl1.Properties.DisplayHorzLines = false;

Replied On August 25, 2003 07:31 AM UTC

Yeah, that almost worked. Thanks. Here's some code that solves it: gridControl1.Properties.DisplayVertLines = false; gridControl1.Properties.DisplayHorzLines = false; gridControl1.TableStyle.Borders.Top = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.White ); gridControl1.TableStyle.Borders.Bottom = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.White ); gridControl1.TableStyle.Borders.Left = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.White ); gridControl1.TableStyle.Borders.Right = new GridBorder( GridBorderStyle.Solid, System.Drawing.Color.White );

Administrator [Syncfusion]
Replied On August 25, 2003 12:04 PM UTC

I think gridControl1.TableStyle.Borders.All = GridBorder.Empty; should also work. Stefan


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon