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?
Thanks,
Virgil
AD
Administrator
Syncfusion Team
April 15, 2005 12:11 PM UTC
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?
VI
Virgil
April 15, 2005 12:25 PM UTC
DropshadowProblem_1628.zip
> 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.
With _Grid
.BeginUpdate()
'' ---------------------------------------------------------------------
'' Set the data source
.DataSource = SourceData
.DataMember = SourceData.Tables(0).TableName
For i = 0 To SourceData.Relations.Count - 1
.Binder.AddRelation("level_" & i)
Next
'' ---------------------------------------------------------------------
'' Create the column bindings
CreateColumnBindings()
'' ---------------------------------------------------------------------
'' Appearance and behavior attributes
Dim Level As GridHierarchyLevel
Level = .Binder.GetHierarchyLevel(0)
With Level
.ShowHeaders = True
.RowStyle.AutoSize = True
.RowStyle.WrapText = True
.RowStyle.VerticalAlignment = GridVerticalAlignment.Bottom
End With
For i = 1 To .Binder.HierarchyLevelCount - 1
Level = .Binder.GetHierarchyLevel(i)
Level.ShowHeaders = False
Next
.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
SyncFusionDataGridHelper.ExpandAll(_Grid)
.EndUpdate()
End With
AD
Administrator
Syncfusion Team
April 15, 2005 12:36 PM UTC
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?
VI
Virgil
April 15, 2005 01:09 PM UTC
DropshadowProblem2_8244.zip
Clay,
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"
PrepareViewStyle modification:
Case _GridColumnNumber.QuotedMaterialCost
e.Style.BackColor = QuotedBackColor
AD
Administrator
Syncfusion Team
April 15, 2005 04:47 PM UTC
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.
VI
Virgil
April 15, 2005 05:53 PM UTC
Hi Clay,
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.
VI
Virgil
April 15, 2005 05:54 PM UTC
Forgot to mention that I also loaded the latest drivers from WindowsUpdate for the Intel boards. That did not help.
VI
Virgil
April 19, 2005 12:53 PM UTC
Any clue as to why the graphics board (if that is indeed the issue) would be affecting the display behavior?
AD
Administrator
Syncfusion Team
April 19, 2005 03:34 PM UTC
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.
http://www.syncfusion.com/Support/user/uploads/GDBG_Derived_78b45db1.zip
VI
Virgil
May 6, 2005 11:46 AM UTC
Hi Clay,
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,
Virgil
AD
Administrator
Syncfusion Team
May 6, 2005 12:50 PM UTC
Thank you for sharing this information.