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.
Syncfusion Feedback

Updating cells in the same row.

Thread ID:

Created:

Updated:

Platform:

Replies:

25091 Feb 17,2005 05:04 PM UTC Feb 17,2005 08:21 PM UTC Windows Forms 1
loading
Tags: GridControl
Walter Cedeno
Asked On February 17, 2005 05:04 PM UTC

We are using a GDBG in Essential Suite version 2.1.0.9. We are trying to implement automated updates to multiple cells in the same row when the user enters information in one of the cells. We use the CurrentCellAcceptedChanges event to update the current cell value and other cells in the same row. After the event completes, we do not see the information on the screen, even though we updated the cell values in the grid and the data source as well. What is the correct way to do this?

Administrator [Syncfusion]
Replied On February 17, 2005 08:21 PM UTC

Try this code.
private bool cellChanged = false;
private void gridDataBoundGrid1_CurrentCellValidating(object sender, CancelEventArgs e)
{
	this.cellChanged = true; 
}
private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
	if(this.cellChanged)
	{
		int col = gridDataBoundGrid1.CurrentCell.MoveFromColIndex;
		int row = gridDataBoundGrid1.CurrentCell.MoveFromRowIndex;
		gridDataBoundGrid1[row, col].CellValue = "SomeText";
		gridDataBoundGrid1[row, col+1].CellValue = "xxxxxxx";
		gridDataBoundGrid1.RefreshRange(GridRangeInfo.Row(row), true);
		gridDataBoundGrid1.Binder.EndEdit();
	}
	this.cellChanged = false;
}

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.

Warning Icon 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.Close Icon

;