My table having a field fld_status. It hold the values 0 and 1. 0 means active ,1 means inactive. But i want to show the meaning full name like active for 0 in the Gridview. Is there is any way to change this value 0 and 1 meaningful name in Gridview other than query?
<asp:TemplateField ItemStyle-Width="40px" HeaderText="STATUS">
<ItemTemplate>
<asp:Label ID="lbl_status" runat="server" Text='<%# Eval("Fld_status")%>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="40px"></ItemStyle>
</asp:TemplateField>
In gridview STATUS column show 0 and 1. I want to show only active and inactive based on o and 1.
If you use a
TemplateField:or from the GridView’s
RowDataBound: