I have a gridview that have a column that I want show It dynamically: If IsExpert or IsAgent equal true show It else not show It and I don't want use RowBoundData.(IsExpert and IsAgent are server side property)
MyCode:
<asp:GridView ID="grvTicketList" runat="server" AllowPaging="True" AutoGenerateColumns="False" CssClass="table half table-hover table-mc-light-blue" GridLines="None"
EmptyDataText="تیکتی موجود نیست" OnPageIndexChanging="grvTicketList_PageIndexChanging" PagerStyle-BackColor="White"
PagerStyle-ForeColor="Black" OnRowCommand="grvTicketList_RowCommand" >
<Columns>
<asp:BoundField DataField="TicketID" ReadOnly="true" HeaderText="شماره تیکت" />
<asp:BoundField DataField="CurrentStateId" ReadOnly="true" HeaderText="شماره مرحله فعلی تیکت" />
<asp:BoundField DataField="TrackingCode" ReadOnly="true" HeaderText="کد رهگیری" />
<asp:BoundField DataField="ServiceName" ReadOnly="true" HeaderText="نام خدمت" />
<asp:BoundField DataField="SubServiceName" ReadOnly="true" HeaderText=" نام زیر خدمت" />
<asp:BoundField DataField="strTicketDate" HeaderText="زمان ثبت تیکت" />
<asp:BoundField DataField="CustomerName" HeaderText=" نام و نام خانوادگی مشتری" />
<asp:BoundField DataField="StateName" HeaderText="وضعیت تیکت" />
<asp:BoundField DataField="UserName" HeaderText="نام ثبت کننده تیکت" />
<asp:ButtonField Text="بازخورد" CommandName="FeedBack" ButtonType="Link" >
<ItemStyle ForeColor="#003399" />
</asp:ButtonField>
</Columns>
<PagerStyle BackColor="White" ForeColor="Black"></PagerStyle>
RowDataBound?