priya

priya

  • NA
  • 32
  • 11.6k

deletetable

Jun 16 2015 6:48 AM
private void Deletetable()
{
try
{
mshtmlTable table = null;
mshtmlTableRow row = null;
GetTableElement(out table, out row);
// process according to table being defined
if (table != null)
{
var tableElement = table as IHTMLDOMNode;
if (tableElement != null)
{
var parentNode = tableElement.parentNode;
if (parentNode != null)
{
parentNode.removeChild(tableElement);
}
}
}
else
{
MessageBox.Show("You have not selected any table");
}
}
catch
{
MessageBox.Show("Insert table to process this commmand");
}
}
 
 
 
this is the code for delete table.. but ctrl+z not working in it..
 
i just want to  improve this method as ctrl+z working in it...

Answers (2)