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.

Accessing the value of lastSyncText

Thread ID:

Created:

Updated:

Platform:

Replies:

71996 Feb 26,2008 01:07 AM Mar 8,2008 11:39 AM Windows Forms 4
loading
Tags: GridControl
Ben
Asked On February 26, 2008 01:07 AM

Hello,

Inside the GridCurrentCell class there's a internal member lastSyncText that holds the value of the current cell while it is being edited. I want access to this value. Is this possible?

Thanks,
Ben


Ben
Replied On February 27, 2008 05:44 PM

Hello,

Alternatively, if there is any other way to tell whatever text has been entered into a cell but not yet saved, that would be good.

I'm using a virtual grid, if that matters.

Thanks,
Ben


Ben
Replied On March 2, 2008 06:08 PM

Poke


Ben
Replied On March 6, 2008 06:24 PM

Hello,

Has anyone got an answer for me yet?

Thanks,
Ben


Jay
Replied On March 8, 2008 11:39 AM

You could get the current entered value (on each key stoke) in the GridCurrentCellValidating event.


this.gridControl1.CurrentCellValidateString += new GridCurrentCellValidateStringEventHandler(gridControl1_CurrentCellValidateString);

void gridControl1_CurrentCellValidateString(object sender, GridCurrentCellValidateStringEventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;

//New value:
Console.WriteLine(e.Text);

//OldValue:
Console.WriteLine(this.gridControl1[cc.RowIndex, cc.ColIndex].Text);
}


Best,
Jay


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.

;