RT。当数据为空时,还想显示标题头,
标题头里有dropDownList,要跟据这个selectvalue查询数据的,当数据为空时,用EmptyDataTemplate,可是用这个就不能用到<LayoutTemplate,让他显示的标题头了。现在我想显示标题头。无论有没有数据。
<asp:ListView ID="LsvShowBug" runat="server">
<LayoutTemplate>
<table id="row">
<tr>
<th class="sender">BugID</th>
<th class="title">Desc</th>
<th class="time">Project<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem Text="no limited" Value="0"></asp:ListItem>
</asp:DropDownList></th>
<th>Organization<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Category<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Priority<asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>State<asp:DropDownList ID="DropDownList5" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Assignedto<asp:DropDownList ID="DropDownList6" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Reproter<asp:DropDownList ID="DropDownList7" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>ReportDate</th>
<th>Last Update By</th>
<th>Last Update Date</th>
</tr>
<tr id="itemPlaceholder" runat="server"></tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr class="table">
<td class="sender"><%#Eval("BugID") %></td>
<td class="messageID"><%#Eval("fldDesc") %></td>
<td class="title"><%#Eval("fldProjectName") %></td>
<td class="time"><%#Eval("fldOrganizationName")%></td>
<td><%#Eval("fldCategoryName") %></td>
<td><%#Eval("fldPriorityName") %></td>
<td><%#Eval("fldStatuName") %></td>
<td><%#Eval("AssignerName") %></td>
<td><%#Eval("ReporterName") %></td>
<td><%#Eval("fldReportedDate") %></td>
<td><%#Eval("UpdaterName") %></td>
<td><%#Eval("fldLastUpdateDate") %></td>
<td><asp:Button ID="btnDelete" runat="server" Text="Delete" CommandName="Delete"/></td>
<td><asp:Button ID="btnView" runat="server" Text="View" CommandName="Select"/></td>
</tr>
</ItemTemplate>
<EmptyDataTemplate>
<table>
<tr><td colspan="3">no new information</td></tr>
</table>
</EmptyDataTemplate>
我想在没有数据时仍然显示layouttemplate里的第一个tr里的东西,肿么弄,
不懂鸟,,,忘各位赐教,,不胜感谢
标题头里有dropDownList,要跟据这个selectvalue查询数据的,当数据为空时,用EmptyDataTemplate,可是用这个就不能用到<LayoutTemplate,让他显示的标题头了。现在我想显示标题头。无论有没有数据。
<asp:ListView ID="LsvShowBug" runat="server">
<LayoutTemplate>
<table id="row">
<tr>
<th class="sender">BugID</th>
<th class="title">Desc</th>
<th class="time">Project<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem Text="no limited" Value="0"></asp:ListItem>
</asp:DropDownList></th>
<th>Organization<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Category<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Priority<asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>State<asp:DropDownList ID="DropDownList5" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Assignedto<asp:DropDownList ID="DropDownList6" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>Reproter<asp:DropDownList ID="DropDownList7" runat="server" AutoPostBack="True">
</asp:DropDownList></th>
<th>ReportDate</th>
<th>Last Update By</th>
<th>Last Update Date</th>
</tr>
<tr id="itemPlaceholder" runat="server"></tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr class="table">
<td class="sender"><%#Eval("BugID") %></td>
<td class="messageID"><%#Eval("fldDesc") %></td>
<td class="title"><%#Eval("fldProjectName") %></td>
<td class="time"><%#Eval("fldOrganizationName")%></td>
<td><%#Eval("fldCategoryName") %></td>
<td><%#Eval("fldPriorityName") %></td>
<td><%#Eval("fldStatuName") %></td>
<td><%#Eval("AssignerName") %></td>
<td><%#Eval("ReporterName") %></td>
<td><%#Eval("fldReportedDate") %></td>
<td><%#Eval("UpdaterName") %></td>
<td><%#Eval("fldLastUpdateDate") %></td>
<td><asp:Button ID="btnDelete" runat="server" Text="Delete" CommandName="Delete"/></td>
<td><asp:Button ID="btnView" runat="server" Text="View" CommandName="Select"/></td>
</tr>
</ItemTemplate>
<EmptyDataTemplate>
<table>
<tr><td colspan="3">no new information</td></tr>
</table>
</EmptyDataTemplate>
我想在没有数据时仍然显示layouttemplate里的第一个tr里的东西,肿么弄,
不懂鸟,,,忘各位赐教,,不胜感谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货