Hi, nedash
Try this way.
I have created sample code which fullfill you requirement.
HTML
<div>
<asp:GridView ID="gvDetails" runat="server" AutoGenerateColumns="false" OnRowDataBound="gvDetails_RowDataBound">
<Columns>
<asp:TemplateField ItemStyle-Wrap="false" ItemStyle-Width="104px" ItemStyle-BackColor="#9fa490"
ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Height="46px">
<ItemTemplate>
<div id="Div" runat="server" visible="false" class="ersal1">
<asp:HyperLink ID="HyperLink1" runat="server" CssClass="LBsefSe" NavigateUrl='<%# "ViewSendOrder.aspx?&PeygiriCode=" + Eval("PeygiriCode") %>'>ارسال شده1</asp:HyperLink>
</div>
<div id="Div1" runat="server" visible="false" class="ersal1">
<asp:HyperLink ID="HyperLink2" runat="server" CssClass="LBsefSe" NavigateUrl='<%# "ViewSendOrder.aspx?&PeygiriCode=" + Eval("PeygiriCode") %>'>ارسال شده2</asp:HyperLink>
</div>
<div id="Div2" runat="server" visible="false" class="ersal1">
<asp:HyperLink ID="HyperLink3" runat="server" CssClass="LBsefSe" NavigateUrl='<%# "ViewSendOrder.aspx?&PeygiriCode=" + Eval("PeygiriCode") %>'>ارسال شده3</asp:HyperLink>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Data" HeaderText="Data" />
</Columns>
</asp:GridView>
</div>
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("PeygiriCode", typeof(string));
dt.Columns.Add("Data", typeof(string));
dt.Rows.Add("Test", "1");
dt.Rows.Add("Test", "2");
dt.Rows.Add("Test", "3");
gvDetails.DataSource = dt;
gvDetails.DataBind();
}
}
protected void gvDetails_RowDataBound(object sender, GridViewRowEventArgs e)
{
HtmlGenericControl myDiv;
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[1].Text == "1")
{
myDiv = (HtmlGenericControl)e.Row.FindControl("Div")
as HtmlGenericControl;
myDiv.Visible = true;
}
else if (e.Row.Cells[1].Text == "2")
{
myDiv = (HtmlGenericControl)e.Row.FindControl("Div1")
as HtmlGenericControl;
myDiv.Visible = true;
}
else if (e.Row.Cells[1].Text == "3")
{
myDiv = (HtmlGenericControl)e.Row.FindControl("Div2")
as HtmlGenericControl;
myDiv.Visible = true;
}
}
}