Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
XamGrid NullReferenceException at ScrollCellIntoView...
posted

Greetings,

 

I have a bit of a puzzle with a hierarchical xamGrid in 12.2. The grid is three levels, bound to business objects via MVVM. Let's call them Parent, Child, and Grandchild, where the root XamGrid is bound to a collection of Parent, each of which has a collection of Child, each of which has a collection of Grandchild. So, it looks something similar to the following:

<xamGrid ItemsSource={Binding Path=Parents}>

  ..regular columns..

  <ColumnLayout Key=Children>

    ..regular columns..

   <ColumnLayout Key=Grandchildren>

...

 

Now the interesting behavior:

  • When I edit one of Parent's columns **and click on the new row of that Parent's Child**, I am getting the error at the end of this post.
  • Errors whether the AllowAddNewRow is top or bottom
  • No error when I click on different Parent's Child's new row.
  • No error when I click anywhere else as far as I can tell
  • No error when I press the tab key or the enter key to enter the data

 

I've tried reproducing in a simple project, and I can't, and it would take too long to get a decent enough of a sample that is as complex as the one I'm working with -- I have styles, bindings, validations, and propagating notify property changes galore. So, I will understand if you can't give me a definitive answer.

But I am just asking if you can have one of the gurus look at the callstack and code for the xamGrid and see if you can give me a sniff as to what could be causing this. If not, then I'm going to have to implement my own new row functionality, and that would break convention for the rest of the application. It's not the end of the world, but it would certainly be less than ideal!

 

Thanks,

Bill Raiford

 

 

 

Error (I had to type this out...4 min!!):

An unhandled exception ('Unhandled Error in Silverlight Application

Code: 4004

Category: ManagedRuntimeError

Message: System.NullReferenceException: Object reference not set to an

instance of an object.

  at

Infragistics.ControlsGrids.Primitives.RowsPanel.ScrollCellIntoView(CellBase

cell, CellAlignment alignment, EmptyDelegate callback)

  at Infragistics.Controls.Grids.XamGrid.ScrollCellIntoView(CellBase cell,

CellAlignment alignment, EmptyDelegate callback)

  at Infragistics.Controls.Grids.XamGrid.SetActiveCell(CellBase cell,

CellAlignment alignment, InvokeAction action, Boolean allowSelection,

Boolean setFocus, Boolean scrollIntoView)

  at Infragistics.Controls.Grids.XamGrid.SetActiveCell(CellBase cell,

CellAlignment alignment, InvokeAction action, Boolean allowSelection,

Boolean scrollIntoView)

  at Infragistics.Controls.Grids.XamGrid.SetActiveCell(CellBase cell,

CellAlignment alignment, InvokeAction action, Boolean allowSelection)

  at Infragistics.Controls.Grids.Cell.OnCellMouseDown(MouseEventArgs e)

  at

Infragistics.Controls.Grids.XamGrid.OnGridMouseLeftButtonDown(Mousebu...

e)

  at

Infragistics.Controls.Grids.XamGrid.XamWebGrid_MouseLeftButtonDown(O...

sender, MouseButtonEventArgs e)

  at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex,

Delegate handlerDelegate, Object sender, Objecct args)

  at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr

unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String

eventName, UInt32 flags)

') occurred in iexplore.exe [6540].

Parents Reply Children
No Data