Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Catastrophic failure Datagrid hovering over Header
11 replies. Latest Post by silverkiwi on February 23, 2009.
(0)
a2005
Member
37 points
39 Posts
12-23-2008 11:42 PM |
I have a simple datagrid. When I hover mouse over the header, I get the following exception (refer to XAML below).
Note: I have not handled any mouse related messages.
Microsoft JScript runtime error: Unhandled Error in Silverlight 2 Application Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData) at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData) at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual) at System.Windows.UIElement.TransformToVisual(UIElement visual) at System.Windows.Controls.Extensions.Translate(UIElement fromElement, UIElement toElement, Point fromPoint) at System.Windows.Controls.Primitives.DataGridColumnHeader.OnMouseMove(Boolean& handled, Point mousePosition, Point mousePositionGridParent) at System.Windows.Controls.Primitives.DataGridColumnHeader.DataGridColumnHeader_MouseMove(Object sender, MouseEventArgs e) at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
================ XAML =============
<swcd:DataGrid x:Name="taskHistGrid" AutoGenerateColumns="False" CanUserReorderColumns="False" AlternatingRowBackground="Transparent" RowBackground="Transparent" Background="Transparent" GridLinesVisibility="All" IsReadOnly="True" CanUserSortColumns="False"> <swcd:DataGrid.Columns> <swcd:DataGridTextColumn Binding="{Binding strUpdateDt}" Header="Date" /> <swcd:DataGridTextColumn Binding="{Binding RemDurn}" Header="Rem. Durn." /> <swcd:DataGridTextColumn Binding="{Binding IssueOwner}" Header="Issue Owner"/> <swcd:DataGridTextColumn Binding="{Binding IssueDetail}" Header="Details"/> <swcd:DataGridTextColumn Binding="{Binding IssueUpdate}" Header="Update"/> </swcd:DataGrid.Columns> </swcd:DataGrid>
ken tucker
All-Star
16276 points
2,479 Posts
12-24-2008 11:57 AM |
I have never had this problem but I have not tried using a background color of transparent. Do you still get the error if you change the background colors?
Amanda W...
17241 points
1,466 Posts
12-27-2008 4:50 AM |
Hi,
There is nothing wrong with your code.
Did you have a try to create a silverlight application to see if the problem still exists.
Or you can try to consider to re-install your silverlight.
12-28-2008 3:51 AM |
Issue solved:
1.Clean and Rebuild Silverlight project in VS2008
2. Clear Browser Cache
Now no crash. Bit wired. Compiler issue ???
einar@do...
27 points
20 Posts
01-12-2009 9:36 AM |
I am getting this exact same problem, but only when I run my solution in Internet Explorer. Running in FireFox or Chrome does not produce the same problem.Tried cleaning the cache and rebuilding. Same problem.
Anyone figured out why this is happening and a way around it?
I am running the December edition of the Silverlight Toolkit
silverkiwi
30 points
22 Posts
02-20-2009 5:13 PM |
I'm also having the same problem, though only with a DataGrid inside a Popup. My other DataGrids are fine.
I've tried rebuilding and clearing the browser cache but it still crashes.
This is on IE7.
Craig
02-21-2009 9:34 AM |
I've somehow got sorted out most of my problems with the datagrid, but am also stuck with the same problem as you have. Putting the datagrid inside a popup will produce this behavior.
Anyone found a workaround for this?
02-21-2009 1:07 PM |
How are you creating the popup in xaml or code?
02-21-2009 3:24 PM |
On another thread, it was pointed out that the root cause of the problem is that the Popup isn't inside a container. If you just create the Popup and set IsOpen to true then it shows correctly, but you get the DataGrid problem. If you add the Popup to a container then the problem goes away.
02-22-2009 2:54 AM |
I bypassed the problem by hiding the header row. There are drawbacks like I cannot resize the columns etc. etc. but it better than a crash. Alternative approach is to do away with datagrid inside popup but then for me there is a big cost of retraining as 95% of my users are from manufacturing and logistics and mostly non-computer saavy
02-23-2009 1:25 AM |
Adding the Popup as a child to a container worked out for me. No more catastrophic failures.
Thanks a bunch for leading me in this direction, its been bugging me for quite a while now.
02-23-2009 2:27 AM |
I'm not sure how much I helped out, but I think this is the first authoriative answer to the problem that I've found.
Anyway, I was very pleased to get the problem solved here as it was a pretty major show-stopper for me!