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
570
Editor per cell grid error
posted

Hey,

We have a grid with editors per cell. on a few computers, at one point, the users are getting the following error:

System.NullReferenceException: Object reference not set to an instance of an object.

   at Infragistics.Win.ValueListDropDownAppearanceManager.ResolveValueListItemAppearance(ValueListItemUIElement valueListItemElement, AppearanceData& appData, AppearancePropFlags requestedProps)

   at Infragistics.Win.ValueListItemUIElement.InitAppearance(AppearanceData& appearance, AppearancePropFlags& requestedProps)

   at Infragistics.Win.ValueListItemUIElement.PositionChildElements()

   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)

   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)

   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)

   at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive)

   at Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify, Boolean syncMouseEntered)

   at Infragistics.Win.ControlUIElementBase.ProcessMouseHover(Object sender, EventArgs e)

   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)

   at Infragistics.Win.UltraControlBase.OnMouseHover(EventArgs e)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at Infragistics.Win.ValueListDropDownUnsafe.WndProc(Message& message)

   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)

Thanks,

Mano

Parents
No Data
Reply
  • 0
    Offline posted

    By looking at the code (using reflection on Infragistics4.Win.v11.1.dll and  Infragistics4.Win.v13.1.dll) it appears that the function is prone to null reference.

    public void ResolveValueListItemAppearance(ValueListItemUIElement valueListItemElement, ref AppearanceData appData, AppearancePropFlags requestedProps)
    {
    ValueListItem valueListItem = (valueListItemElement != null) ? valueListItemElement.ValueListItem : null;
    if (valueListItemElement != null)
    {
    //removed for brievity.
    }
    AppearanceData resolvedAppearance = ValueList.GetResolvedAppearance(valueListItem, valueListItem.ValueList, requestedProps);
    AppearanceData.Merge(ref appData, ref resolvedAppearance, ref requestedProps);
    }

    the function GetResolvedAppearance is passing the 2nd parameter as valueListItem.ValueList where valueListItem can be null.
    the version I checked v11, and v13. not sure about the latest versions. wondering how it passed code review

Children