リピーターがあり、item_command イベントで別のリピーターをバインドしています。そして、私は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="searchbybbloraddress" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
<tfoot>
</tfoot>
</table>
protected void Repaddressorbbl_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "searchbybbloraddress")
{
bind_rep2();
}
}