473,606 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Alternating row in gridview

on the rowcreated or rowdatabound i was looking for the alternateing row
like existed in the datagrid. I need to set a style depending on which row
is current" alternating or row.

Anyone know where it went?
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
Jan 24 '07 #1
3 6350
"WebBuilder 451" <We***********@ discussions.mic rosoft.comwrote in message
news:D9******** *************** ***********@mic rosoft.com...
on the rowcreated or rowdatabound i was looking for the alternateing row
like existed in the datagrid. I need to set a style depending on which row
is current" alternating or row.

Anyone know where it went?
You can do it directly in the tag...

<asp:GridView ..............>
....
....
....
<AlternatingRow Style CssClass="..... ..." />
</asp:GridView>
Jan 25 '07 #2
Thanks for the reply,
Once created,is it then available in code, or can it be found using
findcontrol?

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Mark Rae" wrote:
"WebBuilder 451" <We***********@ discussions.mic rosoft.comwrote in message
news:D9******** *************** ***********@mic rosoft.com...
on the rowcreated or rowdatabound i was looking for the alternateing row
like existed in the datagrid. I need to set a style depending on which row
is current" alternating or row.

Anyone know where it went?

You can do it directly in the tag...

<asp:GridView ..............>
....
....
....
<AlternatingRow Style CssClass="..... ..." />
</asp:GridView>
Jan 25 '07 #3
"WebBuilder 451" <We***********@ discussions.mic rosoft.comwrote in message
news:8A******** *************** ***********@mic rosoft.com...
Thanks for the reply,
Once created,is it then available in code, or can it be found using
findcontrol?
Is "what" then available in code...?

You said you need to set a style depending on whether the current row is an
alternating row or not - the example I gave you will do that.

Is this not what you meant...?
Jan 25 '07 #4

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

Similar topics

2
1739
by: bettyann | last post by:
i am using templates via HTML_Template_IT to create a table from the results of a mysql query. i wanted to change the background image of alternating rows in the table. i thought i could do this by defining two different blocks in the template file and setting the current block based on ( $thisRowNum % 2 ). when the final table is displayed, all the "even" rows are displayed before all the "odd" rows. in other words, the rows are not...
1
4568
by: Alistair Birch | last post by:
Hi I want rows of a table to appear in alternating background colours. Having looked around the web I can't find any solution apart from waiting for the next version of CSS, so I tried building one myself, but I need some help to finish it. I use the getAttribute('rowIndex') to return the position of a row within the table and apply modulo 2 to return a 0 or 1 indicating an even or odd row number, from which I apply the alternating...
1
4669
by: Eirik Eldorsen | last post by:
I'm trying to set alternating bgcolor for a datalist with 2 columns. My problem is that its the alternating cell that get the bgcolor, not the row. Is it possible to set alternating color of rows? Here is my code: <asp:DataList id=dlKommuner runat="server" Width="400px" RepeatColumns="2" CellPadding="3"> <AlternatingItemStyle Width="200px" CssClass="arow"> </AlternatingItemStyle>
9
2685
by: Max Weebler | last post by:
Hi, I have a datagrid built that has an alternating item style that sets the backcolor and ForeColor of its rows. I have 4 template columns. One of them has a LinkButton embedded in it to perform updates. All the styles that are set are being followed by all templated columns with the exception for the update column. The update column does set the BackColor appropriately but when setting its ForeColor the LinkButton's color is blue and...
1
6136
by: Stuart Shay | last post by:
Hello All: I am working on a ASP.NET GridView, I am not sure to correctly define the condition so Alternating Rows are fired with in the event. My Code only works on Item Rows in both Normal and Edit State. protected void gvUserList_RowDataBound(object sender, GridViewRowEventArgs e) {
3
3700
by: Daniel Manes | last post by:
My DataGridView is set up like this: * Main row background color = white * Alternating row background color = light gray I also have a read-only (non-editable) column I want to show up as solid dark gray (i.e., no alternating row colors), but it shows up as alternating dark/light gray. Is there any way to get around this?
4
5683
by: mike | last post by:
how can I change the font color for an alternating row where the column data is formatted as a link? setting a style in the stylesheet for a { color:white; }
3
2101
by: tsedward | last post by:
I am creating a databound gridview. The last cell of each row can, and usually does, contain a lot of text. Is there any way that I could drop this last cell down into the next line on the gridview? This would mean that every other row would ignore the columns and consist of one large column. Is this possible?
0
683
by: dmj07 | last post by:
Hi, What I need to do is to display a gridview that holds data on 1 row then on the next row display another gridview that holds separate data and so on and so forth for repeating rows. E.g. ------------------------------ Gridview1 data ----------------------------- gridview2 data ---------------------------- Gridview1 data
0
8009
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8428
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5962
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5456
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3919
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2442
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1548
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.