i want if condition is true than enable one label and for all other show label for all other
at .cs page
protected void GridView6_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblpend = (Label)e.Row.FindControl("lblpenmdi");
c.cmd.CommandText = "select * from cgrs_feedback where mddos is null and status=1 and assignofficer is not null";
c.da.Fill(c.ds3, "pendmd");
if (c.ds3.Tables["pendmd"].Rows.Count > 0)
{
lblpend.Visible = true;
}
}
}
at aspx page
<asp:TemplateField HeaderStyle-Font-Names="Arial" HeaderStyle-Font-Size="12px" HeaderStyle-ForeColor="Black"
HeaderText="MD Report">
<ItemTemplate>
<asp:Label ID="lblcommdi" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="12px"
Text="completed" ForeColor="maroon" Visible="false"> </asp:Label>
<a href='feedback.aspx?mdi=<%#Eval("f_id") %>' target="_blank">
<asp:Label ID="lblpenmdi" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="12px"
Text="Pending" ForeColor="maroon" Visible="false"> </asp:Label></a>
</ItemTemplate>
<ControlStyle Width="50px" />
<HeaderStyle Font-Names="Arial" Font-Size="12px" ForeColor="white" />
</asp:TemplateField>