Apply Formatting to PushButton?

J

John Mason

Hi,

I have a Datagrid control with an edit command column, which has a
PushButton ButtonType.

I am trying to apply formatting to the plain grey button, to make it
look more appealing on screen. I would like to change the font-size and
the set the background color, the foreground color of the text, and also
set a border color and width.

I have only been able to come up with the following...

<asp:editcommandcolumn Edittext="Submit Report" HeaderText=""
ButtonType="PushButton">
<ItemStyle CssClass="btnClass"></ItemStyle>
</asp:editcommandcolumn>

This however applies formatting to the cell that the button is contained
in.

Any assistance would be very much appreciated!

Thanks,

John.
 
G

Guest

Hi John..do this:-
You have to apply the style to "ButtonType"
With type LinkButton it won't work.

<STYLE>
..buttonStyle { FONT-WEIGHT: bold; FONT-SIZE: 7pt; TEXT-TRANSFORM:
capitalize; COLOR: white; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #7da1e9 }
</STYLE>

<asp:ButtonColumn Text="Do Something" ButtonType="PushButton" />

Enjoy!
 
J

John Mason

Hi,

I tried ...

<STYLE>
..button { FONT-WEIGHT: bold; FONT-SIZE: 7pt; TEXT-TRANSFORM:
capitalize; COLOR: white; FONT-FAMILY: Verdana; BACKGROUND-COLOR:
#7da1e9 }
</STYLE>

<asp:ButtonColumn Text="Do Something" buttonType="PushButton" />

..but the button style hasn't changed. Am I missing something here?

Thanks,

John.
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top