Forms Data Controls :: Gridview Not Showing Alternate Colors
Sep 3, 2010
I am trying to make the colors different for every line, so lets say one line white and the next light grey. I tried it in the gridview usingbut it has no effect on the display! The lines are all white! Only formatting to work is the header formatting.For CSS, I have
<RowStyle
CssClass="gridRow"
/>
<HeaderStyle
CssClass="gridHeaderSort"
/>
[code]...
View 8 Replies
Similar Messages:
Jan 21, 2010
I'm trying to change the CSS class of the row that is in edit mode. I've managed to get it working, but it only works for alternate rows. I'm totally stumped as to what could be causing it to behave like that. I've attached what I think is the relevant code below
[Code]....
protected void grdList_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.CssClass = "row";
}
if (e.Row.RowState == DataControlRowState.Edit)
{
e.Row.CssClass = "rowEdit";
}
}
.grdView tr.row:hover
{
background-color: #999999;
font-weight:bold;
}
.grdView tr.editRow
{
background-color: #999999;
font-weight:bold;
}
.rowEdit
{
background-color: #999999;
font-weight:bold;
}
.grdView .row .edit, .grdView .row .delete
{
display:none;
}
.grdView tr.row:hover td .edit, .grdView tr.row:hover td .delete
{
display:inline;
}
View 3 Replies
May 20, 2010
I have a gridview with auto Edit buttons... when I click on Edit button it is losing it row and column colors.We are initially setting the gridview colors in the page_load event.
View 3 Replies
Aug 12, 2010
I have a gridview that I shows tasks assigned to me in our organization. One thing we've thought of is to have them color coded by date. The date is one of the fields and it's auto sorted by that field. So for example, if there were three tasks, one due tomorrow, one due today, and one due yesterday. I would like my task due yesterday's row style to be highlighted in red, the one due today to be green, and the one due tomorow just to be default.
View 8 Replies
Jan 5, 2011
I have a c# code that put some background color in cells according with some values, the problem is that each time I add a button or a postback occurs I lost all colors (and other attribs).So my workaround in call the function that fills the gridview each time... but this produce a slow performance.
View 4 Replies
Dec 7, 2010
I have any opportunity to change the colors of GridView cells due to it's value. I have an SQLDataSource with different int values, and want minus number to have blue background and plus number - red.
View 2 Replies
Mar 18, 2010
How would I go about changing gridview colours and detailsview colours depending on who logs onto my website? Is there a way of doing it in the code behind (basic example follows) :-
If User = "Peter" Then
Gridview/Detailsview Headerstyle =
Gridview/Detailsview Controlstyle =
End If
The gridview and detailsview are connected to SqlDataSource controls and are databound to a SQL server database.
View 3 Replies
Jul 19, 2013
how to display row values based on condition in grid view control and how to display different row colors based on condition in grid view.
View 1 Replies
Mar 15, 2013
How can i but alternate Image if No image retrieve in image Control ?
View 1 Replies
Feb 9, 2011
I have an application and am trying to display records in a 2 column table with alternate row in a different style.
How can I do this with a repeater?
This is what I am trying to replicate. each city has a checkox and each city is a record in the DB:
[Code]....
View 8 Replies
May 8, 2010
am displaying student attendance in Grid view.I choose absent as A, present as P and leave as L. Now i would like to display A in red color, P in green
View 2 Replies
Feb 8, 2010
I need a way to export data from MySql database (or simply from DataTable) to Excel and set colors of particular rows based on one of the fields' content.
I don't want to export the whole GridView because I need a way to add fields with calculated values as needed.
I have the following code that works:
[Code]....
But I don't know how to set colors to particular rows. Also, I don't know how to make Excel treat text fields that look like numbers as text to avoit scientific notation.
View 1 Replies
Feb 27, 2011
I have gridview and will show data like this :
|Year | Course Code | Teacher |
|2011| 001 | T01 |
|2011|002 | T02 |
How I can show name of course and teacher name? I'm using sqldatasource to bind gridview
View 8 Replies
Feb 11, 2010
I FORGOT TO ADD A DATASOURCE TO THE GRIDVIEW. GRIDVIEW NOW SHOWS. ****When I run my web page my gridview is not showing up. Don't know why. The page is nothing more than an image at top followed by a gridview below.
[Code]....
View 2 Replies
Oct 26, 2010
This is my code.iam providing alternate coloring for my columns in dynamic table.In this i want to avoid Alternate row style color for hiddenfield.
[code]...
View 1 Replies
Apr 13, 2010
is it possible to set different colours for alternating items with the repeater / possible to access the css of alternating items differently.
View 4 Replies
Jan 27, 2010
I am using colorpicker control which comes with ajax control toolkit. Can I have more colors or include custom colors in the color pallete of ColorPickerExtender control ?
View 4 Replies
Mar 16, 2011
I have a gridview which enables editing. The editing sequence works fine. When the user clicks the edit button, I want ONLY the row to be edited to be shown, and all others to be hidden.
This is the code that I have, but it isn't working. Can anyone tell me why and how I can fix it? I am using a dataset to bring text from an XML file.
[Code]....
View 2 Replies
Feb 24, 2011
I have 2 tables named Months & Attendence; Their containing fields are-
#1. MonthsName, StartDate, EndDate (like- January-2011, 01-01-2011, 01-31-2011 ...and so on)
#2. EmpID, Date, Intime, OutTime (Holds a whole months of Data for all employees attendences)
Now I wish to show whole months of Attendence for a specific employee into a data gridview.
There should be shown each day of the month- loaded from a Dropdown.
View 1 Replies
Nov 1, 2010
I am trying to create a form that displays a dropdown and a password. The dropdown will act as the login for the password. If the password is correct the dropdown should be the variable for a gridview that should be visible? Can someone look at my code and see where I may be going wrong or any hints?
ASP Code
[Code]....
c#
[Code]....
View 2 Replies
Feb 10, 2011
I have a folder in my CMS (ektron) which has 95 entries.The public site is only showing 50 rows. Is there something I need to do to the GridView control to show the other 45 entries?
View 2 Replies
Dec 2, 2010
i'm trying to show data in gridview through this code but everything appears except the images. I saved the image in sqlserver2005 as Image datatype and when i try to bind the gridview to the db by wizard the images appear when i press test query but nothing when running the app
In Class Named Admin: public DataTable Select_writer(string writer_name)
[Code]....
View 2 Replies
Nov 19, 2010
A user has multiple images which is stored in database(datatype varbinary ).I want to show all the images of that particular user in gridview.Can you people guide me how to achieve this?(Asp.net with c#)
View 4 Replies
Aug 6, 2010
I have some data displayed in GridView and there are multiple (repeat) entires.
There are about 20 rows of the same data, but I only want to display 1 row.
I know can amend PageSize="1" but then it shows multiple pages which I also don't want.
The multiple rows - are all of the exact same data - but it should only appear once!
View 2 Replies
Jan 14, 2010
I have an image button on my gridview in one column, and in the next column, I have a nested gridview. What I am looking to do, is to use my image button as a way to show and hide my nested gridview. I do not want to use JavaScript, because my page already uses a great deal of JavaScript. Therefore, I want to use code behind on the button, this is what I have done so far:
ImageButton b = (Button)sender;
GridViewRow row = (GridViewRow)b.NamingContainer;
if (row != null) {
int rowIndex = row.RowIndex;
How do I use my selected row index to call the nested gridview to be visible and not visible?
View 3 Replies