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
365
UltraWinTree Error UltraTreeNode.CommitCellValues
posted

Hi,


We were on a really old version of Infragistics (11.2) and we recently upgraded to 16.1.

In the latest version, we found that we are getting an exception with the following code:

private void ut_Click(object sender, EventArgs e)
{
UltraTree utControl = (UltraTree)sender;
if (utControl.ActiveCell == null) return;

switch (utControl.ActiveCell.Column.Key)
{
case "Checked":
utControl.ActiveCell.AllowEdit = AllowCellEdit.Full;
utControl.ActiveCell.BeginEdit();
if ((CheckState)utControl.ActiveCell.Value == CheckState.Unchecked || (CheckState)utControl.ActiveCell.Value == CheckState.Indeterminate)
utControl.ActiveCell.Value = (int)CheckState.Checked;
else if ((CheckState)utControl.ActiveCell.Value == CheckState.Checked)
utControl.ActiveCell.Value = (int)CheckState.Unchecked;

utControl.ActiveCell.EndEdit(false);
utControl.ActiveNode.Update();

Here's the stack trace:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Infragistics.Win.UltraWinTree.UltraTreeNode.CommitCellValues()
at Infragistics.Win.UltraWinTree.UltraTreeNode.Update()
at OptiGlass.ctlOptimizer.ut_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Infragistics.Win.UltraControlBase.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I did a 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Infragistics.Win.UltraWinTree.UltraTreeNode.CommitCellValues()
at Infragistics.Win.UltraWinTree.UltraTreeNode.Update()
at OptiGlass.ctlOptimizer.ut_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Infragistics.Win.UltraControlBase.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Not sure if we're doing something that was OK in 11.2 but is no longer OK in 16.1 or if this is a bug, but I wasn't able to find any information on this.

Thanks in advance!

Steve

Parents Reply Children
No Data