Newbie Question

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,084
Messages
2,570,596
Members
47,217
Latest member
GuadalupeE

Latest Threads

Top