button images in the buttoncolumn of a datagrid

Discussion in 'ASP .Net Web Controls' started by stuart, Jun 9, 2004.

  1. stuart

    stuart Guest

    Hi again

    Hope you can help..

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

    Cheers
    stuart, Jun 9, 2004
    #1
    1. Advertising

  2. 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:...
    > Hi again,
    >
    > Hope you can help...
    >
    > Is there a way to assign an image on the buttons of the buttoncolumn in a
    > datagrid?
    >
    > Cheers
    Ken Cox [Microsoft MVP], Jun 9, 2004
    #2
    1. Advertising

  3. stuart

    stuart Guest

    Cheers Ken.. I'll give that a shot.
    stuart, Jun 9, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Northern
    Replies:
    0
    Views:
    404
    Northern
    Jul 22, 2003
  2. CGuy
    Replies:
    2
    Views:
    2,015
  3. John
    Replies:
    3
    Views:
    3,241
    Giorgio Parmeggiani
    Nov 3, 2003
  4. z. f.
    Replies:
    4
    Views:
    1,352
    z. f.
    Jun 23, 2004
  5. Sameeksha

    Disable ButtonColumn button control through code

    Sameeksha, Apr 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    471
    Sameeksha
    Apr 7, 2005
Loading...

Share This Page