We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

After upgrading 6.4.0.15, ''Object referrence not set to an instance of an object'' message is raising.

Thread ID:

Created:

Updated:

Platform:

Replies:

77965 Nov 22,2008 03:09 AM Dec 12,2008 07:42 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 22, 2008 03:09 AM

Hi,

After upgraded latest Syncfusion 6.4.0.15 version, this problem has raised.

I have one DataBoundGrid inherited from Syncfusion.Windows.Forms.Grid.GridDataBoundGrid, in that grid if I change data in a cell and press tab then it is throwing 'Object referrence not set to an instance of an object' exception at EndEdit method.

The code I have written is there is like:

private void dataBoundGrid_CurrentCellAcceptedChanges(object sender,
CancelEventArgs e)
{
if (dataBoundGrid.CurrentCell.IsEditing)
{
dataBoundGrid.CurrentCell.ConfirmChanges();
}

if (dataBoundGrid.Binder.IsEditing)
{
dataBoundGrid.Binder.EndEdit(); //Here I am getting 'Object reference not set an instance' exception.
}
}

Please let me know why EndEdit() is throwing this exception and the way to avoid it?


Nirmal Raja [Syncfusion]
Replied On November 24, 2008 04:32 PM

Hi Kishan,

Thank you for your interest in Syncfusion control.

The Binder has to be wrapped into the BeginEdit and EndEdit ofth current cell

Please refer the code below:

this.gridDataBoundGrid1.BeginUpdate();
if (gridDataBoundGrid1.CurrentCell.IsEditing) {
gridDataBoundGrid1.CurrentCell.EndEdit();
}
if (gridDataBoundGrid1.Binder.IsEditing) {
gridDataBoundGrid1.Binder.EndEdit();
}
this.gridDataBoundGrid1.EndUpdate();


Let me know if you have any queries.

Regards,
Nirmal


Administrator [Syncfusion]
Replied On November 25, 2008 05:50 AM

Hi,

Thanks for reply.

Already we have above code in my application.
Problem still exist.

These problems were raised after upgraded 6.4.0.15 version.
1) If I click shift+tab at first row first column then this exception raised.

2) If I click tab after entering any of the cell value then this exception raised.

Please suggest me, why EndEdit() method is raising this exception and what way to avoid it?

Thanks
Kishan


Rajadurai C [Syncfusion]
Replied On December 4, 2008 11:02 AM

Hi Kishan,

I was unable to reproduce this behavior in my side. However, i think the following forum thread will give you an idea on preventing this exception being raised.

Please refer this.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=99

Regards,
Rajadurai


Administrator [Syncfusion]
Replied On December 10, 2008 02:36 AM

Hi,

Atlast I found my problem, but it's not my problem.
In new version 6.4.0.15, cellvalues are not accepting null values. So that, Object reference not set an instance exception is raising.

How to avoid this exception, without changing existing null values in new version of syncufusion?

Thanks
-Kishan


Rajadurai C [Syncfusion]
Replied On December 12, 2008 07:42 AM

Hi Kishan,

Sorry for the delayed response.

Please provide us a sample in which the exception has been thrown. So that, we can fix the issue and provide you a solution.

Regards,
Rajadurai


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;