Calendar not shown in Grid EditItemTemplate

5 posts, 0 answers
  1. Bhupinder Singh
    Bhupinder Singh avatar
    13 posts
    Member since:
    Sep 2009

    Posted 10 May 2012 Link to this post

    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>
     

  2. Bhupinder Singh
    Bhupinder Singh avatar
    13 posts
    Member since:
    Sep 2009

    Posted 11 May 2012 Link to this post

       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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 15 May 2012 Link to this post

    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.
  5. Bhupinder Singh
    Bhupinder Singh avatar
    13 posts
    Member since:
    Sep 2009

    Posted 15 May 2012 Link to this post

    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
  6. Bhupinder Singh
    Bhupinder Singh avatar
    13 posts
    Member since:
    Sep 2009

    Posted 15 May 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017