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.

Grid Lines

Thread ID:

Created:

Updated:

Platform:

Replies:

23649 Jan 17,2005 08:28 AM Jan 18,2005 05:41 AM Windows Forms 4
loading
Tags: GridControl
Steve
Asked On January 17, 2005 08:28 AM

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 09:20 AM

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 17, 2005 08:23 PM

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 12:54 AM

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?

Steve
Replied On January 18, 2005 05:41 AM

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

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.

;