Welcome Guest Search | Active Topics | Sign In | Register

Image Button in Grid? Options
James
Posted: Wednesday, August 18, 2010 4:00:47 PM
Rank: Member
Groups: Member

Joined: 10/4/2008
Posts: 28
Is there a way to create an image button column in the grid?

Thanks,
James
eo_support
Posted: Wednesday, August 18, 2010 5:28:40 PM
Rank: Administration
Groups: Administration

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

Yes. You can use a ButtonColumn but set the columns' ButtonText to something like this:

Code: HTML/ASPX
<img src="edit.gif" />


The Grid just takes it and renders it as is inside the cell. So you can pretty much use any valid HTML markup.

Thanks!
James
Posted: Wednesday, August 18, 2010 11:49:12 PM
Rank: Member
Groups: Member

Joined: 10/4/2008
Posts: 28
Thanks, but how do I syntactically add <img src="edit.gif" /> to this line?

<eo:ButtonColumn Width="20" ButtonText="X" CommandName="Delete"></eo:ButtonColumn>
James
Posted: Thursday, August 19, 2010 12:21:41 AM
Rank: Member
Groups: Member

Joined: 10/4/2008
Posts: 28
I think I got it.
<eo:ButtonColumn Width="20" ButtonText="<img src=&quot;../Images/delete.gif&quot;/>" CommandName="Delete"></eo:ButtonColumn>

There is a blue border around the image. Can that be changed?

Thanks,
James
eo_support
Posted: Thursday, August 19, 2010 9:18:36 AM
Rank: Administration
Groups: Administration

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

Try to add border="0" to your image tag. The image is being rendered inside an HTML link (<a> element), so everything is the same as if you use an image inside a link.

Thanks!


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.