By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,759 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,759 IT Pros & Developers. It's quick & easy.

formatting buttons in datagrid

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.