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.

Clearing AddNewRecord row

Thread ID:

Created:

Updated:

Platform:

Replies:

52807 Dec 4,2006 07:40 PM Dec 5,2006 12:16 PM Windows Forms 2
loading
Tags: GridControl
Rocky
Asked On December 4, 2006 07:40 PM

I have a question about unique constraints on an AddNewRecord row. The dataset my grid is bound to has a unique constraint on one of the columns.

If a particular cell is duplicated a grid_ExceptionRaised event is fired. Within this event I try to remove the offending data by doing this:

Record r = this.grid.Table.CurrentRecord;
r.CancelEdit();

Unfortunatly this does not remove the data within the record.

I tried to to remove the data by doing this as well:

this.grid.Table.CurrentRecord.CancelEdit();

This does remove the information but if I try to enter any new info in the AddNewRecord row the value disappears.

How do I remove the data within the AddNewRecord row and have it behave normaly?

Administrator [Syncfusion]
Replied On December 5, 2006 12:16 AM

Hi Rocko,

If you want to cancel the changes in the AddNewRecord,you need to call the Table.CancelEdit method. Please try the suggestion and let me know if this helps.

this.grid.Table.CancelEdit();

Best Regards,
Haneef

Rocky
Replied On December 5, 2006 12:16 PM

The values get cleared but if I try to enter new values into the AddNewRecord row the cell values still disappear as I add them.

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.

;