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.

Committing changes from a NumericUpDown control

Thread ID:

Created:

Updated:

Platform:

Replies:

1375 Oct 22,2002 12:13 PM Oct 22,2002 03:03 PM Windows Forms 1
loading
Tags: GridControl
robert bergelson
Asked On October 22, 2002 12:13 PM

Is there any way to commit changes from the NumericUpDown control without first loosing cell focus ? This is important because I want to commit each button push as it happens rather than waiting to loose focus first.

Administrator [Syncfusion]
Replied On October 22, 2002 03:03 PM

You can try handling the CurrentCellChanged event, and saving the value at that point.
private void gridControl1_CurrentCellChanged(object sender, System.EventArgs e)
{
	Console.WriteLine("gridControl1_CurrentCellChanged");
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	GridStyleInfo style = this.gridControl1[cc.RowIndex, cc.ColIndex];

	if(style.CellType == "FNumericUpDown")
	{
		this.gridControl1[cc.RowIndex, cc.ColIndex].Text = cc.Renderer.Control.Text;
	}
	this.label1.Text = this.gridControl1[cc.RowIndex, cc.ColIndex].Text; 		
}

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.

;