473,396 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Apply Formatting to PushButton?

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.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 1635
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!

"John Mason" wrote:
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.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
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.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark | last post by:
I have two buttons in a DataGrid. If I leave the ButtonType = "LinkButton", the EditCommand and DeleteCommand events fire fine. If I change th ButtonType = "PushButton", the events do not fire. ...
2
by: Nick Gilbert | last post by:
We have a Datagrid which contains a template column with a button in it, as well as an actual button column. If either of the buttons are clicked, the ItemCommand event does not fire. If...
1
by: angus | last post by:
Dear All, I am using VB.net It is found that the <asp:EditCommandColumn/> wouldn't fired an event for OnEditCommand If pushbutton has been used: that is:
2
by: Esperanza | last post by:
Simple question. The formatting code I use in my projet does not apply in my asp pages at run time. Any Idea Why ??? Thanks in advance !!! Esperanza Example 1 this.txtPrix.Text =...
1
by: serge calderara | last post by:
Dear all, If I used the following code on a datagrid object <Columns> <asp:ButtonColumn Text="Events" ButtonType=LinkButton CommandName="ShowEvent"> </asp:ButtonColumn> </Columns>
0
by: DotQuery | last post by:
Hello ASP.NET team : I have a user control that be added into page at runtime , in a postback event handler . I save the information to view state , and load the user control again in...
1
by: Blasting Cap | last post by:
I am having trouble changing the font for a PushButton control in a datagrid button column. I have seen several posts refer to styles and simple changes to the HTML for font changes but most of...
1
by: malachi.constant | last post by:
Hi, I'm creating a page with various sections using <div>, and want some particular formatting properties to apply only in a certain section but not the whole page (for example, in a navigation...
0
by: macbasic | last post by:
Hi, I am a learner who is automating some data from reports to ease my month end pressures. The code below is used to open a text file (a report from our ERP) and seperate the text into columns. Two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.