Hello,
There is a very similar problem with <GridDateTimeColumn>, as this message: http://www.telerik.com/community/forums/reply-thread.aspx?messageId=2088875&threadId=530174 .
However, this problem still happens after the Telerik.Web.UI_2012_1_424_Dev release build.
My problem:
I have a grid with EditForm edit mode enabled.
When I select an editable field that fires a OnTextChanged post back event, if I give focus to an editable <GridDateTimeColumn> field, I get a problem.
Prior to this hotfix, I would get an error the same error: "Text property cannot be set. String was not recognized as a valid DateTime."
After this hotfix, what happend is when I focus an editable <GridDateTimeColumn> field, the contents of the field disappear. Actually, the contents appear to first be selected, then they disappear. Focusing on other types of columns does not do this.
Normal behavior (and expected), as when tabbing from field to field without this post back event, the items are selected. But the selection is not removed.
Here are the two date/time column definitions in my grid, demonstrating the problem:
Here is the column that fires the OnTextChanged event while in Edit-Mode (see <EditItemTemplate>):
Thanks
saxan.sartar (at) gmail (dot) com
There is a very similar problem with <GridDateTimeColumn>, as this message: http://www.telerik.com/community/forums/reply-thread.aspx?messageId=2088875&threadId=530174 .
However, this problem still happens after the Telerik.Web.UI_2012_1_424_Dev release build.
My problem:
I have a grid with EditForm edit mode enabled.
When I select an editable field that fires a OnTextChanged post back event, if I give focus to an editable <GridDateTimeColumn> field, I get a problem.
Prior to this hotfix, I would get an error the same error: "Text property cannot be set. String was not recognized as a valid DateTime."
After this hotfix, what happend is when I focus an editable <GridDateTimeColumn> field, the contents of the field disappear. Actually, the contents appear to first be selected, then they disappear. Focusing on other types of columns does not do this.
Normal behavior (and expected), as when tabbing from field to field without this post back event, the items are selected. But the selection is not removed.
Here are the two date/time column definitions in my grid, demonstrating the problem:
<
telerik:GridDateTimeColumn
DataField
=
"ValidFromDate"
FilterControlAltText
=
"Filter ValidFromDate column"
HeaderText
=
"Valid From"
UniqueName
=
"ValidFromDate"
DataFormatString
=
"{0:MM/dd/yyyy}"
MinDate
=
"1901-01-01"
MaxDate
=
"9999-12-31 23:59:59.999999"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"ValidToDate"
FilterControlAltText
=
"Filter ValidToDate column"
HeaderText
=
"Valid To"
UniqueName
=
"ValidToDate"
DataFormatString
=
"{0:MM/dd/yyyy}"
MinDate
=
"1901-01-01"
MaxDate
=
"9999-12-31 23:59:59.999999"
>
</
telerik:GridDateTimeColumn
>
Here is the column that fires the OnTextChanged event while in Edit-Mode (see <EditItemTemplate>):
<
telerik:GridTemplateColumn
HeaderText
=
"Override Discount $"
UniqueName
=
"OverrideDiscount"
>
<
ItemTemplate
>
<
telerik:RadNumericTextBox
NumberFormat-DecimalDigits
=
"2"
ID
=
"txtOverrideDiscountDsp"
runat
=
"server"
gmNumberFormat-AllowRounding
=
"False"
Type
=
"Currency"
Width
=
"52px"
BackColor
=
"Transparent"
BorderStyle
=
"None"
Value='<%#CoalesceNumericValuesToRadNumberControl(DataBinder.Eval(Container.DataItem, "UpdateCustomerPrice"), null) %>'>
</
telerik:RadNumericTextBox
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
NumberFormat-DecimalDigits
=
"2"
ID
=
"txtOverrideDiscount"
runat
=
"server"
AutoPostBack
=
"true"
OnTextChanged
=
"txtOverrideDiscount_OnTextChanged"
gmNumberFormat-AllowRounding
=
"False"
Type
=
"Currency"
Value='<%#CoalesceNumericValuesToRadNumberControl(DataBinder.Eval(Container.DataItem, "CustomerPrice"), null) %>'>
</
telerik:RadNumericTextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
Thanks
saxan.sartar (at) gmail (dot) com