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 grid info in AcceptChanges Event

After receving a AcceptChanges event, I am trying to update the information for the current cell and other cells in the same row. I use the following code to do this but the values are not displayed on the grid; int col = gdbg.CurrentCell.ColIndex; int row = gdbg.CurrentCell.RowIndex; gdbg.BeginUpdate(BeginUpdateOptions.Invalidate); gdbg[row, col].CellValue = "Some text"; gdbg[row, col+1].CellValue = "Some other text"; gdbg.RefreshRange(GridRangeInfo.Row(gRow), true); gdbg.EndUpdate(true); I tried also updating the appropriate datasource row as well with similar results. Walter

4 Replies

AD Administrator Syncfusion Team February 17, 2005 03:20 PM

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)
		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);
	this.cellChanged = false;


WC Walter Cedeno February 17, 2005 05:12 PM

Now, I am able to see the changes to all columns except the one we moved from.

AD Administrator Syncfusion Team February 17, 2005 05:44 PM

Using, I do not see this problem in this sample. Do you? http://www.syncfusion.com/Support/user/uploads/GDBG_UpdateRow_588bedbf.zip

WC Walter Cedeno February 18, 2005 01:44 PM

This works, thank you.

Live Chat Icon For mobile
Up arrow icon