Дубликат сетки связывает время сервера на одной странице при прокрутке вниз
Привет
При использовании псевдонимов каждой строки я получаю несколько повторяющихся сеток при прокрутке вниз по сетке
Что я уже пробовал:
<pre>SELECT T.DeptID As DeptID ,SUM(CASE WHEN datepart(yyyy,T.DOJ) between 2005 and 2017 and T.Status =0 then 1 else 0 END) As TotalHeadCount, SUM(CASE when T.DOJ >= cast('2017-01-12' as datetime) and T.Status =0 then 1 else 0 END) As NewJoinees1, SUM (CASE When T.deactivate>= Cast('2017-01-12' as datetime) and T.Status =0 then 0 else 1 END) As Resigned1, SUM(CASE WHEN T1.Tobehired IS NULL THEN '0' ELSE Tobehired END) AS Tobehired , SUM(CASE WHEN T1.Openposition IS NULL THEN '0' ELSE Openposition END) As Openposition ,T1.Status As Status FROM EmployeeDetails T LEFT JOIN RecruitmentDetails1 T1 on T.DeptID = T1.DeptID Where T.Status=0 GROUP BY T.DeptID , T1.Tobehired , T1.Openposition , T1.Status
<pre><asp:View ID="View2" runat="server"> <br /> <br /> <table align="center" class="table table-bordered"> <tr valign="middle"> <td>Month </td> <td> <asp:DropDownList ID="ddlMonths" runat="server"></asp:DropDownList> <%--<asp:TextBox ID="txtmonth" runat="server"></asp:TextBox>--%> </td> <td>Year </td> <td> <%--<asp:TextBox ID="txtyear" runat="server"></asp:TextBox>--%> <asp:DropDownList ID="ddlyear" runat="server"></asp:DropDownList> </td> <td> <asp:Button ID="btnGenerate" runat="server" CssClass="btn btn-wide btn-dark-grey" Text="Find" OnClick="btnGenerate_Click" /> </td> </tr> </table> <table align="center"> <tr> <td> <span id="printcontent1"> <asp:DataList ID="DataListHeadCount" HorizontalAlign="Center" DataSourceID="SqlDataSourceHeadCount" runat="server"> <ItemTemplate> <table align="center" class="table table-bordered"> <tr align="center"> <td>Data </td> <td>COUNT </td> </tr> <tr> <td>NEW JOINEES </td> <td align="center"> </td> </tr> <tr> <td>RESIGNATIONS </td> <td align="center"> </td> </tr> <tr> <td>TOTAL HEADCOUNT </td> <td align="center"> </td> </tr> </table> <div> <table > <tr> <td colspan="7" align="center"> <%=ddlMonths.Text %><%=ddlyear.Text %></td> </tr> <tr> <td> <asp:GridView ID="grdvEmployeeLeaveUpdate" runat="server" DataKeyNames="" class="table table-bordered table-striped table-hover" DataSourceID="SqlDataSourceHeadCount" OnRowDataBound="grdvEmployeeLeaveUpdate_RowDataBound" AutoGenerateColumns="False" Width="100%" OnRowDeleting="grdvEmployeeLeaveUpdate_RowDeleting" OnRowEditing="grdvEmployeeLeaveUpdate_RowEditing" OnRowUpdating="grdvEmployeeLeaveUpdate_RowUpdating" OnRowCancelingEdit="grdvEmployeeLeaveUpdate_RowCancelingEdit" OnPageIndexChanging="grdvEmployeeLeaveUpdate_PageIndexChanging"> <Columns> <asp:BoundField DataField="DeptID" HeaderText="Cost Center" ReadOnly="true" /> <asp:BoundField DataField="TotalHeadCount" HeaderText="HeadCount" ReadOnly="true" /> <asp:BoundField DataField="NewJoinees1" HeaderText="Additions" ReadOnly="true" /> <asp:BoundField DataField="Resigned1" HeaderText="Separations" ReadOnly="true" /> <asp:BoundField DataField="Tobehired" HeaderText="To Be Hired" ControlStyle-Width="80px" /> <asp:BoundField DataField="Openposition" HeaderText="Open Position" ControlStyle-Width="80px" /> <asp:BoundField DataField="Status" HeaderText="Status" ControlStyle-Width="80px" /> <asp:CommandField HeaderText="Update" ShowEditButton="True" ControlStyle-Width="80px" /> </Columns> <HeaderStyle></HeaderStyle> </asp:GridView> </td> </tr> </table> </div> </ItemTemplate> </asp:DataList> </span> </td> </tr> </table> <table align="center"> <tr valign="middle" align="center"> <td align="center"> <asp:Button ID="btnExport" runat="server" CssClass="btn btn-wide btn-dark-grey" Text="Export To Excel" OnClick="btnExport_Click" /> <input id="Button2" class="btn btn-wide btn-dark-grey" onclick="return doprintcontent1();" type="button" value="Print Page" /> </td> </tr> </table> <asp:SqlDataSource ID="SqlDataSourceHeadCount" runat="server" ConnectionString="<%$ ConnectionStrings:TimeSheetConnectionString2 %>" SelectCommandType="StoredProcedure" SelectCommand="Sampe4" UpdateCommand="UPDATE RecruitmentDetails1 SET Tobehired = @Tobehired, Openposition = @Openposition, Status=@Status WHERE DeptID = @DeptID"> <SelectParameters> <asp:ControlParameter ControlID="ddlMonths" Name="months" Type="Int32" /> <asp:ControlParameter ControlID="ddlyear" Name="years" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> </asp:View>