![]() |
|
|
|||||||
![]() |
ASP Net - AlternatingItem Style in asp:table |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
HI How can i implement a AlternatingItem Style in a asp:table like in a DataGrid? ch Beffmans *** Sent via Developersdex http://www.developersdex.com *** Beffmans |
|
|
|
|
#2 |
|
Posts: n/a
|
for (int i = 0; i < table.Rows.Count; i++ )
if (i % 2 == 0) table.Rows[i].Attributes.Add("style", "background:red"); -- C# Dev "Beffmans" wrote: > > HI > > How can i implement a AlternatingItem Style in a asp:table like in a > DataGrid? > > ch Beffmans > > > *** Sent via Developersdex http://www.developersdex.com *** > =?Utf-8?B?SmFjZWsgU3Rhd2lja2k=?= |
|
|
|
#3 |
|
Posts: n/a
|
Hello,
I don't think there is any direct way to do it but loop thru and the color manually. Eg: for (int i=0; i<Table1.Rows.Count; i++) { if (i%2 != 0) continue; Table1.Rows[i].BackColor = System.Drawing.Color.Orange; } HTH "Beffmans" wrote: > > HI > > How can i implement a AlternatingItem Style in a asp:table like in a > DataGrid? > > ch Beffmans > > > *** Sent via Developersdex http://www.developersdex.com *** > =?Utf-8?B?U2l2YSBN?= |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to fill in asp:table? | dhanalakshmi | Software | 1 | 10-10-2008 01:03 PM |
| OT: Awards ceremony, Australian style | Johnston | DVD Video | 1 | 12-02-2006 01:50 AM |
| 2006 LG's Holiday of Style Product Briefing | Silverstrand | Front Page News | 0 | 10-26-2006 10:24 PM |
| Mike Meyers - I like your style | Roger | A+ Certification | 1 | 08-05-2003 02:55 AM |