This is a migrated thread and some comments may be shown as answers.

Problem with Null when using with RadGrid

1 Answer 37 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 09 Mar 2009, 08:02 AM
COPIED THIS OVER TO THE RADGRID FORUM


Hi

This is my aspx code for a RadDatePicker used in an Edit template on a RadGrid.

The problem is when I try to add new record the selected date doesn't exist and I get a cast error, I've tried an iif and isdbnull. but cant get it to work, can anyone help.

                                <div>

                                    <label class="gridlabel">Review Date:</label>

                                    <telerik:RadDatePicker  ID="txtReviewDate" runat="server" MinDate="2000-01-01" EnableEmbeddedSkins="False" Skin="Expert" EnableEmbeddedBaseStylesheet="False"  Width="100px" SelectedDate='<%# Eval("ReviewDate") %>' >

                                    <DateInput EnableEmbeddedSkins="False" LabelCssClass="radLabelCss_Expert" Skin="Expert" DateFormat="dd/MMM/yyyy"></DateInput>

                                    <Calendar EnableEmbeddedSkins="False" Skin="Expert" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x" FastNavigationNextImage="~/App_Themes/Expert/Calendar/fastNavRight.gif" FastNavigationPrevImage="~/App_Themes/Expert/Calendar/fastNavLeft.gif" NavigationNextImage="~/App_Themes/Expert/Calendar/arrowRight.gif" NavigationPrevImage="~/App_Themes/Expert/Calendar/arrowLeft.gif"></Calendar>

                                    <DatePopupButton CssClass="radPopupImage_Expert" HoverImageUrl="../App_Themes/Expert/Calendar/datePickerPopupHover.gif" ImageUrl="../App_Themes/Expert/Calendar/datePickerPopup.gif"/>

                                    </telerik:RadDatePicker>

                                </div>

Thanks

Andy

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Mar 2009, 02:27 PM
Hello Andy,

For the convenience of our community I pasted the same link here:

Using RadInput Controls Inside Data-Bound Controls


Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
Andy Green
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Share this question
or