Hey guys,
I have a grid in a form that is contained in a MDI form (the grid form is created by clicking an item of an UltraExplorerBar control), and there are a few ToolStripMenuItem controls in the MDI form that are intended to work as an Edit menu (copy, paste, cut, etc) .
I have added an event handler in the grid form for the click events of the ToolStripMenuItem controls .
The grid seems to work fine, we are able to insert new rows, update, sort, copy, paste, etc, etc.
The problem is when we close the form and create it again (we initialize it by using the form constructor). Clicking on the ToolStripMenuItem control will magically set the DataSource of the Grid to null.
I tried to "fix" it by re-assigning the list of objects to the grid, but I got the following exception in the line Grid.DataSource= ObjList:
"Object reference not set to an instance of an object.""Infragistics2.Win.UltraWinGrid.v8.2" at Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager(Object newDataSource, String newDataMember) at Infragistics.Win.UltraWinGrid.UltraGridBase.set_DataSource(Object value) at MyProject.DataEntryGrid.SetDataSource() in C:\Documents and Settings\ureyes\My Documents\Visual Studio 2008\Projects\MyProject\UserControls\DataEntryGrid.cs:line 718 at MyProject.DataEntryGrid.BindGridData() in C:\Documents and Settings\ureyes\My Documents\Visual Studio 2008\Projects\MyProject\UserControls\DataEntryGrid.cs:line 317 at MyProject.DataEntryGrid.CopySelection(Boolean RemoveSelection) in C:\Documents and Settings\ureyes\My Documents\Visual Studio 2008\Projects\MyProject\UserControls\DataEntryGrid.cs:line 1585 at MyProject.DataEntryGrid.cutToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Documents and Settings\ureyes\My Documents\Visual Studio 2008\Projects\MyProject\UserControls\DataEntryGrid.cs:line 1572 at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
Any help would be appreciated.
Thanks !
Sorry, I had issues with a web component too. Anyway I moved this to the WinGrid forum:
http://forums.infragistics.com/forums/p/15234/55795.aspx#55795
Hello,
From the stack track I infer that you are using the Winforms Infragistics UltraWinGrid - whereas this is the forum for web grid and I am afraid us web folks cannot help much here.
Can you please try posting the same topc in the WinGrid forum located here:
http://forums.infragistics.com/forums/65.aspx
Thanks.