A
Anthony Sullivan
I am trying to evaluate a column in my datagrid and display a different
value based on the result.
I tried using an itemtemplate column but have had no success. Here is what
I'm trying to do essentially... The column I'm trying to evaluate is of
'bit' type.
<asp:TemplateColumn HeaderText="Active">
<ItemTemplate>
<%#
If DataBinder.Eval(Container.DataItem, "active") Then
Response.write("Active")
Else
Response.write("Inactive")
End If
%>
</ItemTemplate>
</asp:TemplateColumn>
I know this code doesn't work but it should give a good idea of what I'm
trying to do.
TIA!
Anthony Sullivan
value based on the result.
I tried using an itemtemplate column but have had no success. Here is what
I'm trying to do essentially... The column I'm trying to evaluate is of
'bit' type.
<asp:TemplateColumn HeaderText="Active">
<ItemTemplate>
<%#
If DataBinder.Eval(Container.DataItem, "active") Then
Response.write("Active")
Else
Response.write("Inactive")
End If
%>
</ItemTemplate>
</asp:TemplateColumn>
I know this code doesn't work but it should give a good idea of what I'm
trying to do.
TIA!
Anthony Sullivan