locked
Ajax calendar not displaying properly inside the gridview RRS feed

  • Question

  • User-1377768212 posted

    In my grid contain one ajax calendar when i click on that it showing a extra space.I don't want that how to fix this error.I am facing the same issue check this http://forums.asp.net/t/1464064.aspx?Calendar+control+resting+in+a+grid+view  also in my grid contain two scrolls down and side.

    In my grid view code..

    <div id="OverFlowDiv" runat="server" >
    
     <aspx:ExtendedGridView ID="GridViewActions" runat="server" OnPageIndexChanging="GridViewActions_OnPageIndexChanging" OnSorting="GridViewActions_Sorting"
                        OnPageSizeChanged="GridViewActions_OnPageSizeChanged" style=";" OnRowDataBound="GridViewActions_OnItemDataBound" Scrollbar="Horizontal" Visible="false"
                        Width="980px">
    
     <asp:TemplateField HeaderText="Completed Date" SortExpression="ActionCompletedDate">
                                <ItemTemplate>
                                    <%--  <telerik:raddatepicker id="completedDate" runat="server" mindate="1/1/1900" skin="Vista"
                                        width="110px" enabletyping="false" autopostback="true" onselecteddatechanged="completedDate_SelectedDateChanged">
                                <Calendar ID="Calendar1" runat="server">
                                </Calendar>
                            </telerik:raddatepicker>--%>
                                    <asp:UpdatePanel ID="completedDateUpdatePanel" runat="server">
                                        <ContentTemplate>
                                            <asp:TextBox runat="server" ID="completedDateText" AutoPostBack="true" OnTextChanged="completedDate_SelectedDateChanged"
                                                Style="width: 73px;" /><input runat="server"
                                                    type="image" id="completedDateImg" src="www.asp.net.com" style="margin:-7px 0" class="Calender" value=" "/>
                                            <ajaxToolkit:CalendarExtender ID="completedDate" runat="server" TargetControlID="completedDateText" OnClientDateSelectionChanged="dateSelectionChanged"
                                                StartDate="01/01/1990" CssClass="cal_Theme3 cal_Theme1" PopupButtonID="completedDateImg" OnClientShowing="clientShowing">
                                            </ajaxToolkit:CalendarExtender>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <asp:HiddenField ID="hfCompletedDate" runat="server" Value='<%# Eval("ActionCompletedDate", "{0:MM/dd/yyyy}") %>' />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Wrap="false" />
                                <HeaderStyle Width="126px" HorizontalAlign="Left" />
                            </asp:TemplateField>
    
      </div>

    Adding dynamic div..

    <div id="ctl00_ContentPlaceHolder1_GridViewActions_div" style="padding-bottom:5px;overflow-x:scroll;overflow-y:hidden;width:980px;max-height:auto;height:auto;">
    
    // gridview code
    
    </div>

    Friday, September 4, 2015 1:26 AM

Answers

  • User61956409 posted

    Hi RajeeshMenoth,

    In my grid contain one ajax calendar when i click on that it showing a extra space.

    I try to reproduce your problem, but the code seems ok, could you show us your screenshot and explain more about your problem?

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="lblid" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Completed Date" SortExpression="ActionCompletedDate">
                <ItemTemplate>
                    <asp:UpdatePanel ID="completedDateUpdatePanel" runat="server">
                        <ContentTemplate>
                            <asp:TextBox runat="server" ID="completedDateText" AutoPostBack="true" OnTextChanged="completedDate_SelectedDateChanged"
                                Style="width: 73px;" /><input runat="server"
                                    type="image" id="completedDateImg" src="www.asp.net.com" style="margin: -7px 0" class="Calender" value=" " />
                            <asp:CalendarExtender ID="completedDate" runat="server" TargetControlID="completedDateText"
                                StartDate="01/01/1990"  PopupButtonID="completedDateImg">
                            </asp:CalendarExtender>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <%--<asp:HiddenField ID="hfCompletedDate" runat="server" Value='<%# Eval("ActionCompletedDate", "{0:MM/dd/yyyy}") %>' />--%>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Left" Wrap="false" />
                <HeaderStyle Width="126px" HorizontalAlign="Left" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    

    Besides, you could check the CSS style of your GridView Cells to find the problem using F12 Developer Tools.

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 6, 2015 10:09 PM