Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > button images in the buttoncolumn of a datagrid

Reply
Thread Tools

button images in the buttoncolumn of a datagrid

 
 
stuart
Guest
Posts: n/a
 
      06-09-2004
Hi again

Hope you can help..

Is there a way to assign an image on the buttons of the buttoncolumn in a datagrid

Cheers
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-09-2004
Hey Stuart,

You need to substitue a TemplateColumn and put an imagebutton into it like
this:

<asp:TemplateColumn>
<ItemTemplate>
<asp:ImageButton id="ImageButton1" runat="server"
ImageUrl="http://weatheroffice.ec.gc.ca/weathericons/00.gif"></asp:ImageButton>
</ItemTemplate>
<EditItemTemplate>
<asp:Button id="Button3" runat="server" CommandName="Update"
Text="Update"></asp:Button>&nbsp;
<asp:Button id="Button2" runat="server" CausesValidation="false"
CommandName="Cancel" Text="Cancel"></asp:Button>
</EditItemTemplate>
</asp:TemplateColumn>

"stuart" <> wrote in message
news:73BE14E0-A3EE-4A06-A4EA-...
> Hi again,
>
> Hope you can help...
>
> Is there a way to assign an image on the buttons of the buttoncolumn in a
> datagrid?
>
> Cheers


 
Reply With Quote
 
 
 
 
stuart
Guest
Posts: n/a
 
      06-09-2004
Cheers Ken.. I'll give that a shot.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable ButtonColumn button control through code Sameeksha ASP .Net Web Controls 3 04-07-2005 06:51 AM
why <asp:ButtonColumn> for datagrid doesn't have CausesValidation property like <asp:Button> z. f. ASP .Net 4 06-23-2004 07:26 AM
DataGrid ButtonColumn/BoundColumn problem John ASP .Net 3 11-03-2003 02:20 PM
Enabling/Disabling a DataGrid ButtonColumn CGuy ASP .Net 2 10-22-2003 05:43 PM
How to use ButtonColumn to select a Datagrid row? Northern ASP .Net 0 07-22-2003 08:34 PM



Advertisments