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

RadDateTimePicker in GridTemplateColumn

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 02 Oct 2008, 05:59 PM
I am using the RadDateTimePicker as follows:

<telerik:GridTemplateColumn HeaderText="Expiry Date" UniqueName="expirydate" Visible="false"
                        <EditItemTemplate> 
                             <telerik:RadDateTimePicker AutoPostBackControl="Both" ID="expirydate" runat="server" Skin="Hay" SelectedDate='<%# Eval("expirydate") %>'
                            </telerik:RadDateTimePicker> 
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 

Because it is in an EditItemTemplate, it throws an error when an 'add' is clicked because there is no value for SelectedDate.  Does anyone have any idea how I can set a default value for this?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Oct 2008, 04:21 AM
Hi Derek,

Here is a KB article on using RadDateTimePicker as editor in GridTemplateColumn.
Using RadDatePicker/RadDateTimePicker as editor in template column of RadGrid

Thanks
Shinu.
Tags
Grid
Asked by
Derek
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or