.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

GridView color

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net


How could I show the entire row or the cell with different color if particular data has been updated previously? For example I am showing 10 employees in gridview with their name and annual  salary, the 5th row employee's salary has been updated with different value. I know I can keep a flag in table and updated with updated flag. Later if I come back to same form, I would like to show this particular employee's  row or salary cell with 'red' color because it has been updated previously. How can I do using VB.net?



View Complete Post

More Related Resource Links

GridView Alternate Row not taking on the background color that I specified

I have a number of gridview controls within my application.  I am unable to assign the alternating row background color attribute.  All other alternate row attributes do "take".  I have temporarily placed these attributes in-line and removed all references to the CSS and to the skin files.  Here are some code samples.  Any thoughts? <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/SiteMasterSG.Master" AutoEventWireup="true" CodeBehind="AddNewMember.aspx.cs" Inherits="IVA.pages.AddNewMember" %> <asp:Content ID="AddNewMemberMenu" ContentPlaceHolderID="MenuContentPlaceHolder" runat="server"> <asp:SiteMapDataSource ID="MemberSiteMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="MemAdmin" /> <asp:SiteMapDataSource ID="GuestSiteMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="Guest" /> <asp:SiteMapDataSource ID="CompanyMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="CoAdmin" /> <asp:SiteMapDataSource ID="SystemSiteMapDataSource" runat="server" ShowStartingNode="False" Site

display color in textbox inside Gridview

Please let me know how to display background color of text box  inside a grid view.The Color value will be obtained from the DB.   eg. #00033

change the color of label control inside gridview


Hi i am saving color as a string in database 

i have a gridview control

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowUpdating="Update_Schedule"
                    OnRowDeleting="Delete_Schedule" OnPageIndexChanging="OnPaging" OnRowEditing="Edit_Schedule"
                    OnRowCancelingEdit="CancelEdit" PageSize="10">
                                <asp:CheckBox ID="Todo" runat="server" AutoPostBack="true" Height="23px" OnCheckedChanged="CheckedChanged" />
                                <asp:HiddenField ID="hdn_ScheduleID" runat="server" Value='<%#Eval("ID") %>' />
                                <asp:Label Text='<%# Eval("Title") %>' runat="server" ID="lbl1"></asp:Label>

varifieng the color of a spicific of gridview acording to avlue



i have agridview wich i connect to access database

i use asp.net  c#

i have afield called code

its value can be  1   2   or 3

i want the color of each row to be acording to the value

thats in the same gridvie to have few colors



Change selected row background color in gridview using javascript


hi frineds,

              i have a gridview with radio buttons in gridview i have chance to select only one item at a time in gridview like this

i need to change the row color of selected item in gridview with radio button using javascript if i select second row with radio button first row comes to normal condition now second row is in selected mode please help to write this functionality using javascript

gridview row color based on different values


lets say i have 10 customers total listed on customer table and i only want  to show the customers who bought something on the gridview. each customer has their own unique customer id# from 1 to 10.

if three of them bought something (lets say customer #1,5,8). those three records will be shown on the gridview.

i want to color the first row yellow, and second row red, and again third row yellow, and fourth row red, and so on.

how can i do this?

how to change the color of disabled link button in gridview



how to change the color of disabled link button in gridview?.. 

trying to change gridview gridlines "color" ??



the below works in Internet Explorer but not firefox.

Does anybody have a solution for this ?


protected void Page_Load(object sender, EventArgs e)

       this.GridView1.Attributes.Add("bordercolor", "c3cecc");

Dyanmically set background color of GridView cell


How can I make the background color of a GridView cell dependent on the boolean value of field?

 <asp:BoundField DataField="L_Enbld" HeaderText="ON" SortExpression="L_Enbld" >
 <ItemStyle BackColor="#CCFFCC" Font-Bold="True" Font-Names="Calibri" />
Want to make red if L_Enbld is false, green if true.
Thank you


Command="Select" in GridView how to change color with css


How to change the selected row in GridView? Currently displayed yellow
I want to change the CSS color of selected row in the GridView.

I Command = "Select" when choosing a row, is shown in yellow.
I want to change that color.
What do I do?

How to change gridview row color on mouse over in asp.net?

In this article we will see how to change gridview row color on mouse over in asp.net applications

How to change alternative color in asp.net gridview rows and columns?

In this article, I will show you how to set alternative color for gridview rows and columns in asp.net.

Inplace Edit in GridView

In this article I am presenting a different way to look at EditItemTemplate, using which user navigation for editing is reduced and . it looks very different (see screeen shots) then regular implementation of GridView.

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend