Skip to main content

Microsoft Silverlight

Answered Question Catastrophic failure Datagrid hovering over HeaderRSS Feed

(0)

a2005
a2005

Member

Member

37 points

39 Posts

Catastrophic failure Datagrid hovering over Header

 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
ken tucker

All-Star

All-Star

16276 points

2,479 Posts

Re: Catastrophic failure Datagrid hovering over Header

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 Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Re: Catastrophic failure Datagrid hovering over Header

 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.

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

a2005
a2005

Member

Member

37 points

39 Posts

Answered Question

Re: Catastrophic failure Datagrid hovering over Header

Issue solved:

1.Clean and Rebuild Silverlight project in VS2008

2. Clear Browser Cache

Now no crash. Bit wired. Compiler issue ???

 

einar@dolittle.com
einar@do...

Member

Member

27 points

20 Posts

Re: Catastrophic failure Datagrid hovering over Header

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 

---
Silverlight MVP
http://www.ingebrigtsen.info

(If this post answered your question, please click on "mark as answer" on this post. Thank you in advance)

silverkiwi
silverkiwi

Member

Member

30 points

22 Posts

Re: Catastrophic failure Datagrid hovering over Header

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

einar@dolittle.com
einar@do...

Member

Member

27 points

20 Posts

Re: Catastrophic failure Datagrid hovering over Header

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?

---
Silverlight MVP
http://www.ingebrigtsen.info

(If this post answered your question, please click on "mark as answer" on this post. Thank you in advance)

ken tucker
ken tucker

All-Star

All-Star

16276 points

2,479 Posts

Re: Catastrophic failure Datagrid hovering over Header

 How are you creating the popup in xaml or code?

silverkiwi
silverkiwi

Member

Member

30 points

22 Posts

Re: Catastrophic failure Datagrid hovering over Header

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.

Craig

a2005
a2005

Member

Member

37 points

39 Posts

Re: Catastrophic failure Datagrid hovering over Header

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

einar@dolittle.com
einar@do...

Member

Member

27 points

20 Posts

Re: Catastrophic failure Datagrid hovering over Header

 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. 

---
Silverlight MVP
http://www.ingebrigtsen.info

(If this post answered your question, please click on "mark as answer" on this post. Thank you in advance)

silverkiwi
silverkiwi

Member

Member

30 points

22 Posts

Re: Catastrophic failure Datagrid hovering over Header

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!

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities