please check the code for colring alternate rows
Code for colour alternate rows in table is given below---
pls check it
I think i am wrong at html lines...
public void colouralternaterow()
{
mshtmlTable table1 = null;
mshtmlTableRow row1 = null;
mshtmlTableCell cell1 = null;
GetTableElement(out table1, out row1, out cell1);
HtmlElement table = getTableHTMLElement();
if(table!=null)
{
HtmlElement selectedrow=table.GetElementsByTagName("tr")[row1.rowIndex];
selectedrow.Style ="table tr:nth-child(even){background-color: red}";
}
else
{
MessageBox.Show("can not do ");
}
}