Hi Mark,
Thank you for reporting this. As a workaround, we can store the value of the cell before the BegingEdit() code base, and set it again.
public partial class Form1 : Form
{
DataTable table;
public Form1()
{
InitializeComponent();
table = new DataTable();
table.Columns.Add("Name", typeof(string));
table.Columns.Add("Value", typeof(double));
table.Rows.Add("John", 123);
table.Rows.Add("Adam", 456);
table.Rows.Add("Peter", 789);
this.radGridView1.DataSource = table;
var calculatorColumn = new GridViewCalculatorColumn();
calculatorColumn.HeaderText = "Calculator Column";
calculatorColumn.FieldName = "Value";
this.radGridView1.Columns.Add(calculatorColumn);
this.radGridView1.EditorRequired += RadGridView1_EditorRequired;
}
private void RadGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
{
if (e.EditorType.Name == "RadCalculatorEditor")
{
e.Editor = new CustomCalculatorEditor();
}
}
}
public class CustomCalculatorEditor : RadCalculatorEditor
{
public override void BeginEdit()
{
var val = this.Value;
base.BeginEdit();
this.Value = val;
}
}
Regards,
Dinko | Tech Support Engineer
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.