Aisha Srivastava

Aisha Srivastava

  • NA
  • 230
  • 28.7k

create automatic tableid during every insertion of nw table

Feb 13 2015 4:47 AM
Hi,
I am making a html editor  ,in which we are using windows form  and  web browser control in which we are using html table,
when we insert a table in editor i want to assign a unique tableid counter(auto) each time when a table is inserted so i can use other functionality
for specific table.
Really  stuck....
Thanks In Advance,
If further clarification is needed let me know..
suggestions r heartily welcome..
 
 //Table Insert Prompt
public void TableInsertPrompt()
{
// if user has selected a table create a reference
mshtmlTable table = GetFirstControl() as mshtmlTable;
ProcessTablePrompt(table);
} //Table Insert Prompt
 
 
 
 
 //Process Table Prompt
private void ProcessTablePrompt(mshtmlTable table)
{
using (TablePropertyForm dialog = new TablePropertyForm())
{
// define the base set of table properties
HtmlTableProperty tableProperties = GetTableProperties(table);
// set the dialog properties
dialog.TableProperties = tableProperties;
DefineDialogProperties(dialog);
// based on the user interaction perform the neccessary action
if (dialog.ShowDialog(this.ParentForm) == DialogResult.OK)
{
tableProperties = dialog.TableProperties;
if (table == null) TableInsert(tableProperties);
else ProcessTable(table, tableProperties);
}
}
} // ProcessTablePrompt