Welcome Guest Search | Active Topics | Sign In | Register

EO.Grid 2 more than 1 db field in a cell Options
Christiano
Posted: Thursday, January 29, 2009 1:29:29 PM
Rank: Advanced Member
Groups: Member

Joined: 11/12/2008
Posts: 42
i have a static column that displays an image.

Code: HTML/ASPX
<eo:StaticColumn AllowSort="True" DataField="StatAnda" 
DataFormat="&lt;img src='/Imagens/Status/{0}' /&gt;"  HeaderText="And" 
Width="35">



i would like to set the Alt property from the img tag with the data from another db field...

the data format would be like this:

Code: HTML/ASPX
<img src='/Imagens/Status/{0}' alt='{1}' />


is it possible??

tks, christiano.
eo_support
Posted: Thursday, January 29, 2009 2:50:38 PM
Rank: Administration
Groups: Administration

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

You will need to do the formatting in your SQL statement. The Grid can only take one data field for each column.

Thanks!
Christiano
Posted: Thursday, January 29, 2009 2:57:40 PM
Rank: Advanced Member
Groups: Member

Joined: 11/12/2008
Posts: 42
can i split the field value in the grid? so in one part would come the file name and on the other the alt attribute?
eo_support
Posted: Thursday, January 29, 2009 3:04:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You can do anything that's possible with string.Format. The Grid calls string.Format with the format string you provided and the value it gets from the db.


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.