AD
Administrator
Syncfusion Team
May 12, 2004 07:07 PM UTC
Before zapping the grid, try making sure there is not an active current cell with code like
this.grid.CurrentCell(-1, -1);
You should upgrade to release 2.0.5.1. 2.0.3.0 is a beta release.
EM
Eugene Mishura
May 12, 2004 08:08 PM UTC
grid.CurrentCell.MoveTo(-1,-1) to be precise...
Unfortunately, it does not work. I have the same exception.
I even tried to clear current selection like
grid.Model.SelectedRanges.Clear();
but it caused other exception when I try to set
grid.DataSource=null
The other exception says:
catched at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg) System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Grid.GridModel.get_Item(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo)
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetCellRenderer(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options)
at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.BinderDataSourceChanged(Object sender, EventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.OnDataSourceChanged(EventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.Set_ListManager(Object newDataSource, String newDataMember, Boolean force, Boolean forceColumnCreation)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.Set_ListManager(Object newDataSource, String newDataMember, Boolean force)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.set_DataMember(String value)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.set_DataSource(Object value)
at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.set_DataSource(Object value)
AD
Administrator
Syncfusion Team
May 12, 2004 08:46 PM UTC
Have you tried the release version?