TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aisha Srivastava
NA
230
28.5k
Remove cell border..
Feb 1 2015 2:36 AM
I am useing htmltable in webbrowser control (win form) *
I am not able to remove the border of selected cell .I used the below code and able to remove left border and top border of cell but could not remove right and bottom border.....please suggest any one..
Code snippet is added below...
Thanks in advance...
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)
{
//table.Style = "border-collapse: collapse";
HtmlElement selectedCell = table.GetElementsByTagName("tr")[row1.rowIndex].GetElementsByTagName("td")[cell1.cellIndex];
{
//selectedCell.Style = "border-right:solid ;border-top:solid;border-left:solid;"; //border-bottom: none";
selectedCell.Style = "border:None";
}
}
else
{
throw new HtmlEditorException("Cell not selected", "underlineComand");
}
}
catch (Exception ex)
{
// process the standard exception
OnHtmlException(new HtmlExceptionEventArgs(null, ex));
}
}
Reply
Answers (
3
)
Replace the Textual values of Word table by Colored ovals C#
regex