Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Error when you click on the Scroll bar of the Datagrid in silverlight 3.0 application
1 replies. Latest Post by ashurocks on October 16, 2009.
(0)
Sailaja ...
Member
6 points
12 Posts
10-15-2009 7:56 AM |
Hi all,
Am using the datagrid to bind the data in my application. I set the columns draggable property to true. So am able to drag the columns and also enabled the scroll bar in the datagrid.
Following are the details.
1. when you move the scroll bar to forward and backward using mouse, it works fine.
2. when you drag the columns to and fro and then when you click on scroll bar to move the scroller forward will returns the "Error on page"
3. When I checked the details for the error, the following are the details I got.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC LM 8)Timestamp: Thu, 15 Oct 2009 11:51:25 UTC
Message: Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'Xaml1': System.ArgumentException: Parameter name: width at System.Windows.Rect..ctor(Double x, Double y, Double width, Double height) at System.Windows.Controls.Primitives.DataGridCellsPresenter.EnsureCellClip(DataGridCell cell, Double width, Double height, Double frozenLeftEdge, Double cellLeftEdge) at System.Windows.Controls.Primitives.DataGridCellsPresenter.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)Line: 453Char: 17Code: 0URI: http://myurl/myapp/ScriptResource.axd?d=ba15PjmiwL6CnOxWJPcfjOrKtA9L9iObuuJWRfJajtHu5IMEshXplEIhKUoXhxdytWtQMxNNJAg9wZAI1UBNqQ2&t=ffffffffe9964ee6
Please help us to get out of this.
Thanks & Regards,
Sailaja.
ashurocks
50 points
27 Posts
10-16-2009 6:54 AM |
hi , I Have faced the same issue when i m adding more rows to my datagrid at buttton click and scrolling up and down to it. So far wat i hav understanafter debugging thru the behaviour when you drag the column to new place the scroll property was not able to recognise the change happen to datagrid and when u scroll for the same it will show the same error. So far solution to this problem is way around but will work . as when ever u drag the column to new place it will be updated in itemsource. now each time when u drag and drop u hav to rebind the datagrid to its own item source so the scrollbar of the datagrid will get in sink with the rows and column of the updated datagrid and while scrolling u will not face any errror.
Hope this works for u :-)