I had created a custom editor using RadNumericUpDown control.
When I type value in editor mode of the cell, the value is not binding to the source. Moreover, value is not display in Cell, when use change the cell or leaving the editor mode.
My code is as followings.
public class RsGridViewColumn : GridViewBoundColumnBase
{
private FrameworkElement CreateEditor(object dataItem)
{
if ((base.DataMemberBinding != null) && (base.DataMemberBinding.Path != null))
{
Binding valueBinding = base.DataMemberBinding;
RadNumericUpDown numericbox = new RadNumericUpDown();
numericbox.ShowButtons = false;
numericbox.ValueFormat = ValueFormat.Numeric;
numericbox.NullValue = string.Empty;
numericbox.Maximum = double.MaxValue;
numericbox.Minimum = double.MinValue;
if (this.ColumnDataType == Ramco.Controls.DataType.Int)
{
numericbox.IsInteger = true;
numericbox.NumberFormatInfo.NumberDecimalDigits = 0;
}
else
{
numericbox.IsInteger = false;
numericbox.NumberFormatInfo.NumberDecimalDigits = this.DecimalLength;
}
base.BindingTarget = RadNumericUpDown.ValueProperty;
if (valueBinding.Converter == null)
{
valueBinding.Converter = new RsDSConvert();
valueBinding.ConverterParameter = this.UniqueName;
}
numericbox.SetBinding(RadNumericUpDown.ValueProperty, valueBinding);
numericbox.Tag = (dataItem as RsDSItem).GetData("rn");
numericbox.Loaded += numericbox_Loaded;
numericbox.KeyDown += Column_KeyDown;
return numericbox;
}
return null;
}
}
please help us to solve this issue.
thanks
Sampathkumar S