Changing Font of button in EditCommandColumn on Datagrid

Discussion in 'ASP .Net Web Controls' started by jdp, Nov 5, 2004.

  1. jdp

    jdp Guest

    I'd like to reduce the font size of the buttons in the EditCommandColumn of
    the datagrid. I haven't found an easier way to do it other than looping
    through the controls collection in the ItemCreated Event, changing the font
    size when I come across a button control.

    Is there an easier way???

    Any feedback would be appreciated.
    jdp, Nov 5, 2004
    #1
    1. Advertising

  2. jdp wrote:
    > I'd like to reduce the font size of the buttons in the EditCommandColumn of
    > the datagrid. I haven't found an easier way to do it other than looping
    > through the controls collection in the ItemCreated Event, changing the font
    > size when I come across a button control.


    Another option would be to apply a CSS class to the EditCommandColumn's
    buttons, but this still involves programmatically accessing the Button
    control in the ItemDataBound or ItemCreated events. The nice thing
    about using a CSS class, though, is that if you want to change the
    appearance, you only have to edit the CSS file; that is, you do not have
    to edit the code and recompile.

    More at
    http://datawebcontrols.com/faqs/ButtonColumns/CssClassForButtons.shtml

    --

    Scott Mitchell

    http://www.4GuysFromRolla.com

    * When you think ASP.NET, think 4GuysFromRolla.com!
    Scott Mitchell [MVP], Nov 7, 2004
    #2
    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. Rick
    Replies:
    1
    Views:
    453
    Richard Ryerson
    Feb 2, 2004
  2. Replies:
    0
    Views:
    339
  3. mttc
    Replies:
    2
    Views:
    2,352
    Roedy Green
    Jul 3, 2009
  4. Colin Basterfield

    Add button in Footer of EditCommandColumn

    Colin Basterfield, Jan 15, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    155
    Colin Basterfield
    Jan 15, 2004
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    363
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page