Hi
you can use following code to show hide Hyperlink in gridview according to your condition.
add
DataKeyNames to your GridView
<asp:GridView DataKeyNames="Status_id" ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="hlnkView" Visible="true" Text="View" runat="server"> </asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
add following code to gridview
RowDataBound event
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
int StatusID = Convert.ToInt16(GridView1.DataKeys[e.Row.RowIndex].Values["Status_id"].ToString());
e.Row.FindControl("hlnkView").Visible = (StatusID > 15) ? false : true;
}
Thanks,
Imdadhusen