Anshul Gupta

Anshul Gupta

  • NA
  • 2
  • 1.8k

i want data from any given table from my editor.

Dec 20 2014 5:40 AM
public void GetData()
{
try
{
mshtmlElement tableElement = GetHTMLElementOfTable();
tableElement.setAttribute("id", "datatable");
HtmlElement table = this.editorWebBrowser.Document.GetElementById("datatable");
if (table != null)
{
foreach (HtmlElement row in table.GetElementsByTagName("tr"))
{
foreach (HtmlElement cell in row.GetElementsByTagName("td"))
{
//????????????? 
 
}
}
}
else
{
throw new HtmlEditorException("Please Select a table table", "ActionTableConvert");
}
}
catch (Exception ex)
{
// process the standard exception
OnHtmlException(new HtmlExceptionEventArgs(null, ex));
}
}