We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

TOC with IWTable

Thread ID:





104398 Jul 16,2012 04:35 PM Jul 17,2012 12:55 AM ASP.NET Web Forms (Classic) 1
Tags: DocIO
John Hu
Asked On July 16, 2012 04:35 PM

I am testing to generate a doc with TOC(table of content). It is all good with some headings and paragraghs. But when I added table (IWTABLE) to the section, the call of UpdateTableOfContents throwed "index out of range" exception. Please help.

Ramkumar M [Syncfusion]
Replied On July 17, 2012 12:55 AM

Hi Kan,

Thank you for your interest in Syncfusion products.

The mentioned exception happens only if the inserted table (IWTable) doesn’t have any rows and columns .As a workaround you have to initialize rows and columns by ResetCells(int rows,int columns) function of IWTable.

Code snippets:

//Inserting table of contents       

IWTable table = section.AddTable();

//set rows and columns

table.ResetCells(2, 2);

 For your reference we have prepared a sample to illustrate this workaround. Please find the sample from attachment and let us know if it helps you.

Please let us know if you have any other questions





This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.