Error while calling grid.EndUpdate()

I am getting Object reference not set to an instance of an object error when i call
grid.EndUpdate() . Following is the stacktrace i got

22700406: Object reference not set to an instance of an object. Stack Trace to follow...
: at Syncfusion.Windows.Forms.Grid.Grouping.GridTableDescriptor.EnsureSummaryDescriptors()
at Syncfusion.Grouping.Group.GetSummaries(Table parentTable, Boolean& summaryChanged)
at Syncfusion.Grouping.Element.GetSummaries(Table parentTable)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Update()
at Syncfusion.Windows.Forms.Grid.GridControlBase.EndUpdateModel(Boolean update, Boolean fromModel)
at Syncfusion.Windows.Forms.Grid.GridControlBase.EndUpdate(Boolean update)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.EndUpdate(Boolean update)

2 Replies

AD Administrator Syncfusion Team December 4, 2006 05:15 AM UTC

Hi Sameer,

We were not able to reproduce the issue here. Is it possible for you to upload us a sample or modify any of our browser samples to reproduce the issue here? This will help us to analyse the issue further.

Best Regards,
Haneef


SA Sameer December 4, 2006 04:42 PM UTC

Hi Haneef,

I have function which moves visible columns following is the code snippet from source code

private void SetupPeopleViewGridLook()
{
lock(this._resultsGrid)
{
try
{
if this._resultsGrid.TableDescriptor.VisibleColumns.Count > 0)
{
this._resultsGrid.BeginUpdate();
int source = this._resultsGrid.TableDescriptor.VisibleColumns.IndexOf("Last Name");
if(source >= 0)
this._resultsGrid.TableDescriptor.VisibleColumns.Move(source, 0);
source = this._resultsGrid.TableDescriptor.VisibleColumns.IndexOf("First Name");
if(source >= 0)
this._resultsGrid.TableDescriptor.VisibleColumns.Move(source,1);
source = this._resultsGrid.TableDescriptor.VisibleColumns.IndexOf("Nick Name");
if(source >= 0)
this._resultsGrid.TableDescriptor.VisibleColumns.Move(source,2);
this._resultsGrid.TableDescriptor.EnsureSummaryDescriptors();
this._resultsGrid.EndUpdate(true); }
}
catch (Exception ex)
{
Logger.getInstance().logError("Error configuring people grid view.", ex);
throw new PresentationException("Error configuring people grid view.", ex);
}
}
}

This code is working in syncfusion 4.1 but not in 4.2

Please reply asap..
Thanks
Sameer

Loader.
Up arrow icon