Welcome Guest Search | Active Topics | Sign In | Register

Simple text hyperlink column in Grid Options
Dave Covert
Posted: Tuesday, May 31, 2011 4:00:26 PM
Rank: Member
Groups: Member

Joined: 5/31/2011
Posts: 11
I am moving from an asp:repeater to a eo:Grid.

One of the columns in my repeater item template is defined like this:

Code: HTML/ASPX
<td><a href="<%# DataBinder.Eval(Container.DataItem,"Link") %>" target="_blank">Report</a></td>


How do I do the same thing in the eo:grid?

Dave
eo_support
Posted: Tuesday, May 31, 2011 4:19:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

EO.Grid works very differently --- specifically, it does not use server side data binding expressions. Usually you can set the GridColumn's DataFormat and DataField to archive simple data expressions. For example, setting DataField to "Link" and DataFormat to <a href="{0}"></a> would archive similar result.

Thanks!
Dave Covert
Posted: Wednesday, June 1, 2011 9:47:50 AM
Rank: Member
Groups: Member

Joined: 5/31/2011
Posts: 11
This syntax doesn't seem to work?

DataFormat = "<a href="{0}"></a>"

It is not happy about the '<' and '>'... do escape them with something?

Dave


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.