Remove border of selected cell in htmltable in windows form....
public void stylecell()
public void stylecell()
{
mshtmlTable table1 = null;
mshtmlTableRow row1 = null;
mshtmlTableCell cell1 = null;
GetTableElement(out table1, out row1, out cell1);
HtmlElement table = getTableHTMLElement();
try
{
if (table != null)
{
HtmlElement selectedCell = table.GetElementsByTagName("tr")[row1.rowIndex].GetElementsByTagName("td")[cell1.cellIndex];
{
selectedCell.Style = "border-right:Red ";//border-top:Red;border-left:Red;"; //border-bottom: none";
}
}
else
{
throw new HtmlEditorException("Cell not selected", "underlineComand");
}
}
catch (Exception ex)
{
// process the standard exception
OnHtmlException(new HtmlExceptionEventArgs(null, ex));
}
}


Khargesh RajputRank #616 · 3.9K reputationPosted Jan 9, 2015, 9:27 PM EST
Aisha SrivastavaRank #7,688 · 236 reputationPosted Jan 11, 2015, 4:53 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 17, 2015, 10:34 AM EST
I suggest using the developer tools of your browser to determine where the style (and such) is coming from that produces the border.
If you can be more specific about how the HTML is created and/or where it is coming from then perhaps someone can be more specific about what to do.
Aisha SrivastavaRank #7,688 · 236 reputationPosted Jan 19, 2015, 10:19 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 20, 2015, 8:03 AM EST
If the HTML is from somewhere else then I suggest using the developer tools of your browser to determine what the HTML is. In IE press F12 to open the developer tools. Then click on "DOM Exlorer". Then click on the icon just below "DOM Exlorer" that has an arrow and a rectangle. Then when you move the cursor to the page you can click somewhere in the page. When you click in the page, the corresponding HTML will be shown in the bottom, in the "DOM Exlorer". You need to determine what needs to be changed based on what the HTML is and what it needs to be.