System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
I get the above message when I:
-I have a GridView databound to a DomainDataSource
-I make some changes to CurrentItem (through some other bound controls)
-I then try to select a different item (which triggers the DomainDataSource_DataView_CurrentChanging event where I do the following:
(Th
-And clicking Ok (RejectChanges()) Causes the above error
---Also Clicking cancel performs -in the domain data source- the expected behavior of preventing the current item from changing, but the gridview has the issue of not recognizing that the change was canceled as posted here:
http://www.telerik.com/community/forums/silverlight/gridview/can-you-cancel-a-row-change.aspx
(So in short, by changing the collection, during a change, it is causing the above error)
Is there some way I can resolve this? (It performs the expected function of rejecting the changes, however, it brings up that error)
at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
I get the above message when I:
-I have a GridView databound to a DomainDataSource
-I make some changes to CurrentItem (through some other bound controls)
-I then try to select a different item (which triggers the DomainDataSource_DataView_CurrentChanging event where I do the following:
void
cashSale_DataView_CurrentChanging(
object
sender, CurrentChangingEventArgs e) {
if
(IgnoreCurrent_Changing)
return
;
DomainDataSource domainDataSource = cashSale_DomainDataSource;
if
(domainDataSource.HasChanges) {
if
(ViewBase.CheckChanges(domainDataSource)) {
domainDataSource.RejectChanges();
}
else
{ e.Cancel =
true
; }
}
}
e
IgnoreCurrent_Changing
is false in this case, so it does not return early)-And clicking Ok (RejectChanges()) Causes the above error
---Also Clicking cancel performs -in the domain data source- the expected behavior of preventing the current item from changing, but the gridview has the issue of not recognizing that the change was canceled as posted here:
http://www.telerik.com/community/forums/silverlight/gridview/can-you-cancel-a-row-change.aspx
(So in short, by changing the collection, during a change, it is causing the above error)
Is there some way I can resolve this? (It performs the expected function of rejecting the changes, however, it brings up that error)