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

Calendar not shown in Grid EditItemTemplate

4 Answers 132 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Bhupinder Singh
Top achievements
Rank 1
Bhupinder Singh asked on 10 May 2012, 09:46 AM
HI,

I have a Grid in a RadWindow. This grid has a RadDatePicker control in EditItemTemplate. The calendar is not shown when I click on the datepicker control. 


                               
<telerik:RadWindowManager ID="RadWindowManagerActuals" ShowContentDuringLoad="true" VisibleStatusbar="true" width="820px" Height="800px"
                                  ReloadOnShow="true" runat="server" Skin="Default" EnableShadow="false">
          <Windows>
          <telerik:RadWindow ID="RadShowActuals" runat="server" Behaviors="Close" Modal="true"  >
      <ContentTemplate>               
            <telerik:RadGrid ID="GrdMeasureActuals" AutoGenerateColumns="False" AllowPaging="True" GridLines="Both" CellPadding="2"
                  AllowSorting="True" runat="server"  OnNeedDataSource="GrdMeasureActuals_NeedDataSource" OnUpdateCommand="GrdMeasureActuals_UpdateCommand"
                  OnItemCommand="GrdMeasureActuals_ItemCommand" OnItemDataBound="GrdMeasureActuals_ItemDataBound"
                   Width="780px">
                  <PagerStyle Mode="NextPrev" />
                  <GroupingSettings CaseSensitive="false" />
                  <MasterTableView TableLayout="Fixed" PageSize="300" DataKeyNames="ID">
                      <Columns>
                          <telerik:GridButtonColumn FooterText="Edit" DataTextFormatString="Edit" ButtonType="ImageButton"
                              UniqueName="Edit" HeaderText="Edit" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                              CommandName="Edit" DataTextField="ID" ImageUrl="~/_layouts/images/edit.gif"
                              HeaderStyle-Width="25px">
                          </telerik:GridButtonColumn>                       
                           <telerik:GridTemplateColumn HeaderText="Actual Value Date" SortExpression="ActualValueDate" HeaderStyle-Width="60px" >
                              <ItemTemplate>
                                 <asp:Label Id="LblActualValueDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"ActualValueDateString")%>' />
                              </ItemTemplate>
                              <EditItemTemplate>
                                     <telerik:RadDatePicker ID="DatActualValueDate" runat="server" Width="140px" Enabled="true"
                              AutoPostBack="false" DateInput-EmptyMessage="" MinDate="01/01/2010" MaxDate="01/01/2100" Culture='<%# preferredCulture %>' >
                               
                                      <Calendar runat="server">
                                          <SpecialDays>
                                              <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                          </SpecialDays>
                                      </Calendar>
                                  </telerik:RadDatePicker>
                                   <asp:Label runat="server" ForeColor="red" Id="LblErrorActualValueDate" />
                              </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                                 </Columns>
                  </MasterTableView>
              </telerik:RadGrid>
             <br />
            
             
         </ContentTemplate>
          </telerik:RadWindow>
         
      </Windows>
  </telerik:RadWindowManager>
 

4 Answers, 1 is accepted

Sort by
0
Bhupinder Singh
Top achievements
Rank 1
answered on 11 May 2012, 09:53 AM
   If I take the DatePicker control out of the EditItemTemplate and place it somewhere else in telerik window, the control is working as expected. Only insde RadGrid's edit item template it is not working. I think it does not have anything to do with z-index. the problem is somewhere else.
It seems to be a bug in DatePicker control. It is not working if I put the contorl in EditItemTemplate of RadGrid which is place in a telerik window.
0
Eyup
Telerik team
answered on 15 May 2012, 10:56 AM
Hello Bhupinder,

Thank you for contacting us.

I have followed the described scenario and used the provided code to create a sample RadGrid application. I am afraid the problem is not replicable on my side - everything works as expected. Could you please find the attached project and let me know whether I am missing something out?

I am looking forward to your reply.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Bhupinder Singh
Top achievements
Rank 1
answered on 15 May 2012, 11:01 AM
Hi,

thanks for your reply. I decided to use shared calendar instead of using rad date picker in each row. It is working fine, the last problem is now getting the new selected value from text box in updated event of Grid. I am using the code shown by your team in the demo for Grid with shared calendar. Could you point me in the right direction to get the new value of Text box ?

Thanks
0
Bhupinder Singh
Top achievements
Rank 1
answered on 15 May 2012, 12:06 PM
HI,

I found out what the problem was, the text box was readonly that's why I was not able to read the new values in code behind.
Tags
Calendar
Asked by
Bhupinder Singh
Top achievements
Rank 1
Answers by
Bhupinder Singh
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or