Changing Font of button in EditCommandColumn on Datagrid

J

jdp

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.
 
S

Scott Mitchell [MVP]

jdp said:
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
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top