Hi,
I have a check box and WebDateTimeEdit controls in a form. When the user check the checkbox, I need to make sure the WebDateTimeEdit has a date value (and pass this value to a stored procedure). When the user unselects the check box, I need to pass a NULL value to the stored procedure.
I tried to implement this using custom validator, but its not firing when I have the property Nullable="true". When I change Nullable="false", the custom validator fires, but there will always be a default date value, even when I try to remove it.
Here is my control code:
<igtxt:WebDateTimeEdit ID="WebDateTimeEditControl" Width="80" DataMode="DateOrDBNull" Value ='<%# Bind("DateControlValue") %>' runat="server" Nullable="true" NullText=""></igtxt:WebDateTimeEdit>
Any help on this would be appreciated.
Regards,
SK
Hi SK,
It has been some time since your post, however in case you still need assistance I would be glad to help.
After researching the matter it seems that validation for WebDateTimeEdit is not available when the control is nullable. However upon deleting the value in the editor's input field you should be able to handle the client side ValueChanged event in order to manually set the control's value to an empty string using:
oEvent.srcElement.value=""
Please note that WebDateTimeEdit is among the controls which have been retired in version 11.2. You can a detailed list of the retiring controls and their replacements at:
http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/11/17/asp-net-product-changes-in-2011-volume-2.aspx
Feel free to contact me if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support