For some reason my grid has started showing a dropshadow when editing a cell. I can''t find anything in the help about this and a scan of the code doesn''t show anything specifying such an option.
I wouldn''t mind the dropshadow, but it leaves itself behind when moving to a new row =(. Any clues on this one?
ADAdministrator Syncfusion Team April 15, 2005 07:11 AM
I think this is not normal behavior.
Did this occur with a change of versions?
Do you have grid.ExcelLikeCurrentCell or SelectionFrame set? This can lead to a wider selection frame.
Are there any exceptions being thrown and showing up in your output window?
Does the problem show up in any of our samples?
Can you upload a sample showing the problem?
VIVirgilApril 15, 2005 07:25 AM
> Did this occur with a change of versions?
Still using the same version/
> Do you have grid.ExcelLikeCurrentCell or SelectionFrame set? This can lead to a wider selection frame.
The grid.ExcelLikeCurrentCell is false.
I see some events for SelectionFrame changed, etc. but no methods. The events are not handled.
> Are there any exceptions being thrown and showing up in your output window?
No exceptions show up.
> Does the problem show up in any of our samples?
No. Also, it is only one grid withing the application. Not all grids.
> Can you upload a sample showing the problem?
Attached is a screenshot of shat is occurring. You will be able to see the dropshadows left behind as well as the on on the current cell.
Below is my binding routine.
'' Set the data source
.DataSource = SourceData
.DataMember = SourceData.Tables(0).TableName
For i = 0 To SourceData.Relations.Count - 1
.Binder.AddRelation("level_" & i)
'' Create the column bindings
'' Appearance and behavior attributes
Dim Level As GridHierarchyLevel
Level = .Binder.GetHierarchyLevel(0)
.ShowHeaders = True
.RowStyle.AutoSize = True
.RowStyle.WrapText = True
.RowStyle.VerticalAlignment = GridVerticalAlignment.Bottom
For i = 1 To .Binder.HierarchyLevelCount - 1
Level = .Binder.GetHierarchyLevel(i)
Level.ShowHeaders = False
.AllowResizeToFit = False
.Model.RowHeightEntries(0).Height = 50
.Model.Options.ResizeColsBehavior = .Model.Options.ResizeColsBehavior Or GridResizeCellsBehavior.InsideGrid
.TableStyle.WrapText = False
.CurrentCell.MoveTo(.Model.Rows.HeaderCount + 1, 3)
.Properties.BackgroundColor = SystemColors.Window
.ShowTreeLines = True
.EnableAddNew = False
.ContextMenu = Me.GridContextMenu1
.MinResizeColSize = 10
.MinResizeRowSize = 10
AddHandler .PrepareViewStyleInfo, AddressOf Grid_PrepareViewStyleInfo
AddHandler .RowSaved, AddressOf Grid_RowSaved
AddHandler .CurrentCellChanged, AddressOf Grid_CurrentCellChanged
AddHandler .CurrentCellDeactivated, AddressOf Grid_CurrentCellDeactivated
AddHandler .CurrentCellActivated, AddressOf Grid_CurrentCellActivated
AddHandler .RowsDeleting, AddressOf Grid_RowsDeleting
AddHandler .RowsDeleted, AddressOf Grid_RowsDeleted
ADAdministrator Syncfusion Team April 15, 2005 07:36 AM
Have not seen anything like this before.
If you cover that window with another application (or drag it off and back on the screen), do these extra borders go away?
What kind of column is it? You are not using your own cell type in that column are you?
VIVirgilApril 15, 2005 08:09 AM
I am not using any special column type. The grid is bount to a dataset built from an Oracle Db. The column type is a Number.
I tested a few items and here is what I found (very strange).
1. Moving a window on top of the grid and back off still leaves the dropshadow.
2. Dragging the window off then back on still leaves the dropshadow.
3. The shadows go away if I resize the window.
4. I removed hooking up the PrepareViewStyle and that didn''t help.
5. From the screenshot you can see that the application is an MDI application.
The dropshadow top left appears to be offset by the MDI frames top left (see new shreenshot).
I tried it from several different positions and it is consistent.
Bound column setup:
BoundColumn = SetColumnHeader(Level, ColumnNames.BaseQuoteData.QuotedMaterialCost, "Qtd Unit $")
BoundColumn.StyleInfo.Format = "0.0000"
e.Style.BackColor = QuotedBackColor
ADAdministrator Syncfusion Team April 15, 2005 11:47 AM
Have you tried this on another system just as a sanity check?
If it behaves the same on another system, then getting a sample that shows the problem would allow us to try to debug it.
VIVirgilApril 15, 2005 12:53 PM
I had tried it on 2 machines and the behavior was the same. For an extra check I loaded it on a 3rd and the dropshadow did not appear!
As far as I can tell the only difference in machines was the graphics boards. The 2 having the problem contained "Intel(r) 82815 Graphics Controller" The one that worked was a "Radeon 7000". I placed the graphics card that worked into my machine and booted with 2 monitors. The dropshadow appears on the old monitor but does not appear on the new one. I also swapped out a few different monitors (just in case), but that didn''t help either.
VIVirgilApril 15, 2005 12:54 PM
Forgot to mention that I also loaded the latest drivers from WindowsUpdate for the Intel boards. That did not help.
VIVirgilApril 19, 2005 07:53 AM
Any clue as to why the graphics board (if that is indeed the issue) would be affecting the display behavior?
ADAdministrator Syncfusion Team April 19, 2005 10:34 AM
One thing to try might be to see if using GDI drawing will avoid this problem or if turning off double bufferring will affect it. Here is a
sample project that has a derived grid that exposes properties to control the GDI painting and the double bufferring. You could add this class to your project and swap out the GridDataBoudGrid occurrences to use this MyGrid class.
VIVirgilMay 6, 2005 06:46 AM
We finally figgured this one out. During start of the application, the main forms Opacity is set to 0 so that only the splash screen was displayed. After the applicatino initialization was complete, the main forms Opacity was set back to normal. This caused the buggy dropshadow effect we saw. It also messed up the way the MDI parent form was refreshing the menu display. Basically it wasn''t repainting the menu bar when a child eas maximized-unmaximized.
Have a great day,
ADAdministrator Syncfusion Team May 6, 2005 07:50 AM