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. Image for the cookie policy date

Updating cells in the same row.

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?

1 Reply

AD Administrator Syncfusion Team 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;
}

Loader.
Live Chat Icon For mobile
Up arrow icon