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?
ADAdministrator Syncfusion Team 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.)
ADAdministrator Syncfusion Team 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?
ADAdministrator Syncfusion Team January 18, 2005 12:54 AM
Your code seems to work for me using 3010 in this sample.
Do you have other code that might be setting border styles somewhere?
STSteveJanuary 18, 2005 05:41 AM
I found the mistake in my code. (queryCellInfo wasn''t wired in my test) Thanks.