Re: conditional in GridView Eval binding?
- From: John Prado <j_m_g_p@xxxxxxxxx>
- Date: Tue, 27 Jun 2006 15:41:58 -0300
Your code is wrong. You're mixing server and javascript in the same line.
Try do this in GridView_RowDataBound event
get the data bind for LocationType
do your friendly string
show it in the correspondent cell
Dabbler wrote:
I'm trying to replace a user code in data column with user friendly text for a GridView ItemTemplate as in:.
Text='<%# Eval("LocationType")%> == "P" ? "Pickup" : "DropOff"'
However the value always displays "DropOff" as if the binding doesn't return any P's but I know there are Ps in the rows I'm testing with.
LocationType is defined as char(1) in the table.
Any suggestion why this isn't working?
Thanks.
- Follow-Ups:
- Re: conditional in GridView Eval binding?
- From: Michael Appelmans
- Re: conditional in GridView Eval binding?
- Prev by Date: Re: How to set the compiler language
- Next by Date: Re: TableAdapters Created in Dataset (XSD) Issues
- Previous by thread: IIS Authentication on MOTORALA Q
- Next by thread: Re: conditional in GridView Eval binding?
- Index(es):