我有一箇中繼器。我想隱藏並顯示特定條件的特定列。我有三種類型的主題,他們的ID分別是0,1,2。現在我想表明,特定的列時拍攝對象的只有2 ..顯示並隱藏直放站中的特定列?
我的代碼是: -
<table id="table1" class="yui" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>
<a href='#' title="Click Header to Sort">EmpID #</a>
</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="Repaddressorbbl" runat="server" OnItemCommand="Repaddressorbbl_ItemCommand">
<ItemTemplate>
<tr id="gh" style="cursor: pointer" onclick="Select(this);">
<td style="text-align: center;">
<%#Eval("empid")%>
</td>
<td>
<asp:LinkButton ID="lknumber" runat="server" Text="Edit" CommandName="subjectid" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
<tfoot>
</tfoot>
</table>
檢查這一項:http://stackoverflow.com/questions/6051483/is-it-possible-to-hide-a-column-in-an-asprepeater –