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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Lines

Thread ID:





23649 Jan 17,2005 01:28 PM UTC Jan 18,2005 10:41 AM UTC WinForms 4
Tags: GridControl
Asked On January 17, 2005 01:28 PM UTC

Is it possible to turn off grid lines for individual cells? For example, I want to turn off the vertical grid lines for cell 2,2. It seems I can''t override InternalDrawVertBorders, but perhaps there is an event I can catch and cancel? Thanks, Steve

Administrator [Syncfusion]
Replied On January 17, 2005 02:20 PM UTC

By default, the grid draws the bottom and right borders for each cell. So, you can set gridControl1[2,2].Borders.Bottom = GridBorder.Empty; gridControl1[2,2].Borders.Right = GridBorder.Empty; to turn these borders on an individual cell. (With a GridDataBoundGrid, you cannot set individual properties like this, so you would have to use either model.QuerycellInfo or PrepareViewStyleInfo to handle this.)

Administrator [Syncfusion]
Replied On January 18, 2005 01:23 AM UTC

Why is it that if I hard code the borders property in the load event that it works, but if I set the border property on the query cell info event it does not. For example, in queryCellInfo I am setting the following, but the border is still being drawn. if (e.RowIndex == 1 && e.ColIndex == 2) { e.Style.Borders.Bottom = Syncfusion.Windows.Forms.Grid.GridBorder.Empty; } Is there another property I need to set? Thanks, Steve

Administrator [Syncfusion]
Replied On January 18, 2005 05:54 AM UTC

Your code seems to work for me using 3010 in this sample. http://www.syncfusion.com/forums/Uploads/GC_Borders.zip Do you have other code that might be setting border styles somewhere?

Replied On January 18, 2005 10:41 AM UTC

I found the mistake in my code. (queryCellInfo wasn''t wired in my test) Thanks.


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