B Beffmans Jul 20, 2005 #1 HI How can i implement a AlternatingItem Style in a asp:table like in a DataGrid? ch Beffmans
G Guest Jul 20, 2005 #2 for (int i = 0; i < table.Rows.Count; i++ ) if (i % 2 == 0) table.Rows.Attributes.Add("style", "background:red");
for (int i = 0; i < table.Rows.Count; i++ ) if (i % 2 == 0) table.Rows.Attributes.Add("style", "background:red");
G Guest Jul 20, 2005 #3 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.BackColor = System.Drawing.Color.Orange; } HTH
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.BackColor = System.Drawing.Color.Orange; } HTH