473,385 Members | 2,162 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,385 software developers and data experts.

formatting buttons in datagrid

Hi all,

I have several template columns in my datagrid, is there an attribute that
sets the fore color for the text in these buttons...I would like them to be
black instead of the default link colors, or even better yet, can I use
custom images for my buttons and where would I find an example of using
image buttons within a datagrid?
Cheers, Lerp
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<asp:Hyperlink runat="server" Text='Details' NavigateUrl='<%#
"agentdetails.aspx?empid=" &
Server.UrlEncode(Container.DataItem("empid"))%>'/>&nbsp;
</ItemTemplate>
</asp:TemplateColumn>
Nov 18 '05 #1
2 1149
ForeColor attribute for the text color. Since you have several columns, use
stylesheets and CssClass attribute. Use ImageUrl attribute to attach images.
All these attributes should be set for <asp:Hyperlink> element.

Eliyahu

"Lerp" <ad***@officience.ca> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have several template columns in my datagrid, is there an attribute that
sets the fore color for the text in these buttons...I would like them to be black instead of the default link colors, or even better yet, can I use
custom images for my buttons and where would I find an example of using
image buttons within a datagrid?
Cheers, Lerp
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<asp:Hyperlink runat="server" Text='Details' NavigateUrl='<%#
"agentdetails.aspx?empid=" &
Server.UrlEncode(Container.DataItem("empid"))%>'/>&nbsp;
</ItemTemplate>
</asp:TemplateColumn>

Nov 18 '05 #2
Thank you Eliyahu!

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OF**************@TK2MSFTNGP10.phx.gbl...
ForeColor attribute for the text color. Since you have several columns, use stylesheets and CssClass attribute. Use ImageUrl attribute to attach images. All these attributes should be set for <asp:Hyperlink> element.

Eliyahu

"Lerp" <ad***@officience.ca> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have several template columns in my datagrid, is there an attribute that sets the fore color for the text in these buttons...I would like them to

be
black instead of the default link colors, or even better yet, can I use
custom images for my buttons and where would I find an example of using
image buttons within a datagrid?
Cheers, Lerp
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<asp:Hyperlink runat="server" Text='Details' NavigateUrl='<%#
"agentdetails.aspx?empid=" &
Server.UrlEncode(Container.DataItem("empid"))%>'/>&nbsp;
</ItemTemplate>
</asp:TemplateColumn>


Nov 18 '05 #3

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

Similar topics

6
by: Jon | last post by:
Hello, I have a datagrid and the data in it is dynamically created at runtime... For iCounter = 0 To dataset.Tables(0).Columns.Count - 1 Dim objbc As New BoundColumn() With objbc .DataField...
0
by: Josh Harris | last post by:
Here is my issue: I have a datagrid that is populated with a datatable. I want the columns of the datagrid to be sortable. I also want to format the numeric columns such as two decimal places...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
3
by: Jay | last post by:
I noticed somewhere on the net that a post mentioned that there was a bug in the datagrid, radio buttons and a repeater. Something about the radio buttons are not mutually exclusive. (will this be...
1
by: Jay | last post by:
I need to validate 21 sets of radio buttons before submission to the server for calculation and storage. Is it best to validate on the client side using javascript or to validate on the server...
0
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
4
by: hope | last post by:
Hi, How can I format a string field using Data Formatting Expression property in datagrid? For example: format last name from BROWN to Brown. Thanks
1
by: Michael Calvin | last post by:
Some basic things I cannot figure out how to do with new datagrid. 1) How do I control the formatting of the column header separately from the rest of the column? 2) If I align right the...
5
by: Vik | last post by:
If there are a few Select buttons in a datagrid, is there a way to distinguish in code which button was clicked? Thanks.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.