I have a RadGridView... One of its columns is GridViewTextBoxColumn. The cells in this column are editable and hold currency values. The users are able to enter the values. But I want to restrict the users to be able to enter only 2 digits after the decimals. The editor should not let users to enter anything 2 digits after decimal, e.g., 123.45 is correct but 123.4567 in wrong.
This issue happens while entering the data and not while displaying it.
How can I achieve the above functionality... (Even if use GridViewDecimalColumn the problem stays. In anycase, I do not want to use GridViewDecimalColumn because GridSpinEditor doesn't work with the functionalities we want).
I am using following during grid intialization but it is not working.
This issue happens while entering the data and not while displaying it.
How can I achieve the above functionality... (Even if use GridViewDecimalColumn the problem stays. In anycase, I do not want to use GridViewDecimalColumn because GridSpinEditor doesn't work with the functionalities we want).
I am using following during grid intialization but it is not working.
private void radGridAdjustments_Initialized(object sender, EventArgs e)
{
radGridAdjustments.Columns.Add(
new GridViewTextBoxColumn("AdjAmount"));
radGridAdjustments.Columns[
"AdjAmount"].FieldName = "AdjAmount";
radGridAdjustments.Columns["AdjAmount"]).FormatInfo = CultureInfo.CurrentCulture
radGridAdjustments.Columns["AdjAmount"].FormatString = "{0:c}";
radGridAdjustments.Columns[
"AdjAmount"]).FormatInfo.NumberFormat.CurrencyDecimalDigits = 2;
}