Home Forums WinForms controls Xceed Grid for WinForms Error in expanding grid

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13098 |

    I am trying to get detailgrids to start expanded, the ‘expand’ method results in an error message. does anyone know what might be the problem and what I can do to get my grid started in its full glory?

    Thanks in advance!

    Kees

    Imported from legacy forums. Posted by keesp (had 2381 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Kees,

    What is the error message?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 300 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Jenny,

    The code and the error message is added at the end of the message.
    My main problem is, that I want the gird to expanded when this code is called, but it only seems to be working by calling the collapsechanged event.

    This is the code that is called:

    //add the inner grids for command attributes, parameters
    //and child commands
    DetailGrid commandGrid = this.CreateCommandAttributesGrid( command );
    this.DetailGridTemplates.Add( commandGrid );
    this.FillCommandAttributesGrid( commandGrid );
    commandGrid.Collapse();

    DetailGrid grid = this.CreateParameterDetailGrid( command );
    this.DetailGridTemplates.Add( grid );
    this.FillParameterDetailGrid( grid );
    this.EndInit();

    this.DetailGridTemplates[ 0 ].Expand();
    this.DetailGridTemplates[ 1 ].Expand();
    this.UpdateDetailGrids();
    this.ResumeLayout();

    And this is the error message:

    An unhandled exception of type ‘System.Reflection.TargetInvocationException’ occurred in mscorlib.dll

    Additional information: Exception has been thrown by the target of an invocation.

    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.NullReferenceException: Object reference not set to an instance of an object.
    at EcoChemie.NovaCV.Controls.Commands.ParameterGrid.DetailGrid_CollapsedChanged(Object sender, EventArgs e) in c:\products\ecochemie\autolab\commandlibrary\parametergrid.cs:line 521
    — End of inner exception stack trace —
    at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
    at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
    at System.Delegate.DynamicInvoke(Object[] args)
    at Xceed.Grid.GridElement.RaiseEvent(Object eventKey, EventArgs e)
    at Xceed.Grid.GroupBase.OnCollapsedChanged(EventArgs e)
    at Xceed.Grid.GroupBase.Expand()
    at EcoChemie.NovaCV.Controls.Commands.ParameterGrid.ShowCommand() in c:\products\ecochemie\autolab\commandlibrary\parametergrid.cs:line 385
    at EcoChemie.NovaCV.Controls.Commands.ParameterGrid.set_Root(ITreeMap value) in

    Cheers,

    Kees

    Imported from legacy forums. Posted by keesp (had 3652 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.