I am trying to set a default insert value. I have read the forums on how to do this from code-behind, and I have that working. However I am very curious if there is a way to do this using the documented DefaultInsertValue property. Whenever I try it, a javascript error is generated:
I have also tried '<% = Now() %>'.
I get the following error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The default insert value for column colInspectionDate cannot be converted to type System.DateTime
I am using Q2 2011. Is this a bug? Is DefaultInsertValue supposed to work? Is there a formating option I have to use on the date? I have been unable to find anyone who has a working example other than the code-behind solution.
Thanks.
<
telerik:GridDateTimeColumn DataField="InspectionDate" DataType="System.DateTime" DefaultInsertValue='<% = Now().ToString() %>'
FilterControlAltText="Filter colInspectionDate column" HeaderText="Date"
UniqueName="colInspectionDate">
</telerik:GridDateTimeColumn>
I have also tried '<% = Now() %>'.
I get the following error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The default insert value for column colInspectionDate cannot be converted to type System.DateTime
I am using Q2 2011. Is this a bug? Is DefaultInsertValue supposed to work? Is there a formating option I have to use on the date? I have been unable to find anyone who has a working example other than the code-behind solution.
Thanks.