Solution2
If you want to update the cell value while editing, you can use the TableControlCurrentCellEditingComplete event. This event will be triggered when editing is completed in current cell. Please refer to the below code example
Code example
this.gridGroupingControl1.TableControlCurrentCellEditingComplete+=
gridGroupingControl1_TableControlCurrentCellEditingComplete;
void gridGroupingControl1_TableControlCurrentCellEditingComplete(object sender, GridTableControlEventArgs e)
{
int col = this.gridGroupingControl1.TableDescriptor.ColIndexToField(currentCell.ColIndex);
string currentColumn = this.gridGroupingControl1.TableDescriptor.Columns[col].Name;
if (currentColumn == "Ship City")
{
Record record = this.gridGroupingControl1.Table.CurrentRecord;
string value = record.GetValue(currentColumn).ToString();
record.SetValue("Ship Country", value);
}
} |