Using a GridView: how to change the font color depending on the content???

I am working on a web application using VB.NET 2005. I am filling some gridviews using data sets; and I was trying to change the font color for some records considering one of the fields content "text".

for example: I would like to change to color red the whole row when the field "Status".Text = "Out of order"  the rest of the rows will remain with the same default color.


thanks for suggestions.
0
mendez_edd
5/22/2006 10:55:02 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
592 Views

Similar Articles

[PageSpeed] 35

Something like this will work:

http://weblogs.asp.net/hpreishuber/archive/2006/01/09/434889.aspx

Darrell Norton, MVP
Darrell Norton's Blog


Please mark this post as answered if it helped you!
0
DarrellNorton
5/23/2006 1:43:15 AM
Reply:

Similar Artilces:

How to change tree view's (web control) back color, font color and font size using CSS (Cascading Style Shteets)
Hi All, I have created tree view (web control) but i want to change all the properties of it, through single style sheet. Like all other controls (label, text box and combo box) it's not possible to change all the properties of treeview through single style sheet by including it to the contol ???? Please help........ MAITRAY. Sorry. No external css. but these attributes: DefaultStyle="background:#CCCCCC;border:solid 1px;color:black;font-size:8pt" HoverStyle="color:blue;font-name:Arial" SelectedStyle="c...

Trying to use the FAQ " Sorting and paging in the GridView control when not using data source controls "Sorting and paging in the GridView control when not using..."
and I am not getting the results I had hoped for.  I keep getting a "Compiler Error Message: CS0123: No overload for 'AdhocJobGridView_PageIndexChanged' matches delegate 'System.EventHandler'".   Here is my event handling... protected void AdhocJobGridView_PageIndexChanged(object sender, GridViewPageEventArgs e){ try { AdhocJobGridView.DataSource = wsBaseInfoArray; AdhocJobGridView.PageIndex = e.NewPageIndex; AdhocJobGridView.DataBind(); }catch (Exception ex) {throw ex; }   Here is my aspx... <asp:GridView ID="AdhocJobGridView...

FormView control
When a user modifies the value in a textbox in a "EditTemplate" of the Form View, I would like the font color or back color of the text box to change - even before the update is submitted. How can I do that? Thanks. You can add an onchange event to your textbox: onchange="this.style.backgroundColor='yellow';" Or use the onkeyup event as well. You may need to add the handler for this if your textbox box is being created in the client side.Please mark as "answer" if this helped you in anyway. Thanks. here is how I did it:Protected Sub FirstName...

Problem to use TreeView Control in a 'content page' This Error Occur "Only Content controls are allowed directly in a content page that contains Content controls."
hi I am trying to use the TreeView Control inside the content page (Page that has a master page is a content page). On compiling the project I got the following ASP.Net runtime error: "Only Content controls are allowed directly in a content page that contains Content controls."B@b@R J Issue resolved. I was putting script tag in the content page that is not allowed. when remove the script from content page problem is resolved.B@b@R J...

How to change the SQL used for the GridView, when using a control parameter in the datasource
I'm using a GridVeiw with and Access database. I want to allow users to select a date and then update the GridView to show only data entered after that date. So my question is, how do I modify the SQL used by the datagrid? I'm using a control parameter as part of my AccessDataSource and I think that is what I'm having trouble figuring out how to include. Here is my datasource, with the control parameter in the the GridView. The GridView works fine with these initial settings settings. <asp:AccessDataSource ID="AccessDataSourceForwView" runat="server" ConflictDetection="Compa...

Signature font and color changes to message font and color
My first post. When I compose a message no matter what the signature font and color is set to, it changes to whatever the font and color is of the message. Is there a fix for this? I would ask my job's tech support but I wouldn't trust them to sit the right way on a toilet seat. -- doover ------------------------------------------------------------------------ doover, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, ...

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: http://forums.asp.net/t/1069245.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

Repeater Control: How to change change font color of <TR> or <TD>
I have a Repeater control which displays customer orders within an Html table. I need to dynamically change the font color of each <TR> row or <TD> table data tag. The color is stored in the same row I'm displaying, so retrieving the color value is not a problem. Am I on the right track here : My aspx page has the repeater control as follows: <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource_Orders" OnDataBinding="Repeater1_DataBinding" OnItemDataBound="Repeater1_ItemDataBound"> and my aspx.cs has this so far (not much really): protec...

Datagrid(.net 1.1) to GridView(.net 2.0) and using the RowUpdating event how to extract the values from the controls.
Ok  This is the settings: I use a Viewgrid with only itemtemplate colums for example. <asp:TemplateField HeaderText="Test"><ItemTemplate><asp:Label id="LBL_Test" text='<%# DataBinder.Eval(Container.DataItem, "Test1") %>' runat="server" meta:resourcekey="LBL_TestResource1"></asp:Label></font></ItemTemplate> <EditItemTemplate><asp:TextBox ID="HDN_Test" Text='<%# DataBinder.Eval(Container.DataItem, "Test1") %>' Runat="server" meta:resourcekey="HDN_TestResource1" /></EditItemTemplate></asp:TemplateField>  The ...

In .NET, font color changes in a string
In modern .NET do we still alter the changes to the font inline or with a class?Like:         if (strGoal.Equals(""))        {            QueryResult.Text = "You Must Enter a <font color='red'>Goal Name</font> before proceeding";            return;        } Or:        if (strGoal.Equals(""))&...

Disabled control
Hello, In the asp control like textbox/radio buttons/etc, you can disabled the control - Enabled="False". May I ask how do I change the disabled control font color? Now when it is disabled, the font color is light grayish. I want to change it to a more visible color. Please let me know how (if it can be done), thanks. it can't be done...

using controlS to control a gridview
This question is probably posted but i did not bother to look at 10,000+ posts so i am sorry. I've seen the tutorial where he builds a dataset and uses a gridview and controls the gridview with the drop down list box. What i am trying to do is to control the gridview with 2 drop down list boxes. First select the Country you life in and then the State. I've looked at the grid view properties but couldn't find where i can add another parameter. Is it possible to control a grid view (or any form of displaying the information) with more than 1 controller? Thank You.  ...

Color changes AND font changes...
I would REALLY like to change the fonts for calendars just like I do with BG colors. Can I do it by adding something like font-size: 15pt !important in the calendar ICS file? Thanx, zeddock PS. I notice many patches are referenced here. Why is there not a more regular Sunbird release, nightly or weekly? zeddock wrote: > I would REALLY like to change the fonts for calendars just like I do > with BG colors. Can I do it by adding something like > font-size: 15pt !important > in the calendar ICS file? > > Thanx, > zeddock > > PS. I notice ...

Using CssClass to change color of GridView headers
I'm trying to change the bright blue sort links at the top of my GridView to another color by putting a CssClass in the <HeaderStyle>.  Here's what doesn't work: <HeaderStyle CssClass="ListGridViewHeader" HorizontalAlign="Left" /> .ListGridViewHeader{color: Maroon;}td.ListGridViewHeader{color: Maroon;}a.ListGridViewHeader:link{color: Maroon;}a.ListGridViewHeader:visited{color: Maroon;}a.ListGridViewHeader:hover{color: Maroon;}a.ListGridViewHeader:active{color: Maroon;}  This is my CSS.GridHeader{    height:20px; &n...

Web resources about - Using a GridView: how to change the font color depending on the content??? - asp.net.presentation-controls

Help:Contents - Wikipedia, the free encyclopedia
Templates are special pages that contain boilerplate text intended to be displayed on more than one page in Wikipedia. This Tip of the day box ...

Portal:Contents/Culture and the arts - Wikipedia, the free encyclopedia
The word culture is derived from the Latin root cultura or cultus meaning to "inhabit, cultivate, or honour". In general, culture refers to human ...

The Best Branded Content Partnerships of 2015
To say native content has grown since last year would be an understatement. In 2014, Pressboard combed through 1,500 pieces of content for our ...

Yahoo Video Guide Helps Users Find Content to Stream on Mobile
... on iOS and Android. The app serves as a search engine for movies and television shows, with the goal of helping users find and stream content ...

Today’s apps gone free: Content Blocker, The Room, Pry and more
... but trust us, its worth the ride. PRY is available for free for a limited time. It has a 4.5-star rating with a total of 58 ratings. Content ...

Smart Content Center Business Day – ArcticStartup Meets Korean TechHub
... Media to meet the NIPA (National IT Promotion Agency) as well as representatives from the ICT government during the Business Day of Smart Content ...

The Content Coattails of the Digital Generation and 5 Ideas To Do Better
... up in the world for people to learn from, react to, discuss or comment on. It seems like each day, we lose a little piece of the soul of content, ...

Time will Tell: Content Marketing Predictions for 2016
Our ability to see into the future well enough to make good predictions is more the product of diligent work than tea-leaf reading (with all ...

Verizon's FiOS TV DVR Can Now Stream Content Outside the Home -
... month we noted how the latest update to Verizon's FiOS TV DVR came with a few notable improvements, including the ability to now stream content ...

Content Theft Websites Delivering More Than Just Content
New research shows a thriving $70 million a year market for malware delivery on content theft Websites.

Resources last updated: 12/15/2015 12:50:38 PM