Try this...:)
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" width="241px" onrowdatabound="GridView1_RowDataBound" xmlns:asp="#unknown">
<columns>
<asp:templatefield>
<itemtemplate>
<asp:hyperlink id="HyperLink1" runat="server">HyperLink</asp:hyperlink>
</itemtemplate>
</asp:templatefield>
<asp:boundfield datafield="gender" />
</columns>
</asp:gridview>
protected void Page_Load(object sender, EventArgs e)
{
DataTable table = new DataTable();
table.Columns.Add("gender");
DataRow dr = table.NewRow();
dr["gender"] = "gril";
table.Rows.Add(dr);
this.GridView1.DataSource = table;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[1].Text == "gril")
{
HyperLink hl = e.Row.FindControl("HyperLink1") as HyperLink;
hl.NavigateUrl = "http://www.girl.com";
}
}
}