Hi Christoph,
Thanks for your interest in Syncfusion products.
You can achieve your desired behavior by using CurrentCellValidating and PrepareViewStyleInfo events with respective codes. The following code explains the same.
void gridDataBoundGrid1_CurrentCellValidating(object sender, CancelEventArgs e)
{
GridCurrentCell gcc = this.gridDataBoundGrid1.CurrentCell;
if (gcc != null && gcc.ColIndex == this.gridDataBoundGrid1.Binder.NameToColIndex("Col2"))
{
double value;
Double.TryParse(gcc.Renderer.ControlText, out value);
this.gridDataBoundGrid1[gcc.RowIndex, 1].CellValue = value / 3;
this.gridDataBoundGrid1[gcc.RowIndex, 2].CellValue = (value / 3.0) * 2;
}
}
void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.RowIndex > 1 && e.ColIndex == this.gridDataBoundGrid1.Binder.NameToColIndex("Col2"))
{
double val1 = Double.Parse(this.gridDataBoundGrid1[e.RowIndex, this.gridDataBoundGrid1.Binder.NameToColIndex("Col0")].Text);
double val2 = Double.Parse(this.gridDataBoundGrid1[e.RowIndex, this.gridDataBoundGrid1.Binder.NameToColIndex("Col1")].Text);
double result = val1 + val2;
e.Style.CellValue = result;
}
}
Here is a sample for your reference.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GDBG_3-704780279.zipPlease let us know if you have any further concerns.
Regards,
Arulraj A