How to identify a table in RTF document


Author
Message
Tom Galczynski
Tom Galczynski
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 29, Visits: 87
Hello.  I am creating multiple ntables in a document, saving the document to an RTF string into a sql table. My question is, how can I identify/locate a specific table in the doc so I can remove it and create another table in its place? I would like to give my users the option of re-creating specific tables in the doc but i'm not sure how I could find the table once it's been loaded into the NRichTextView.

Thanks!

Replies
Tom Galczynski
Tom Galczynski
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 29, Visits: 87
Thank you, that's a help.  However, how can I identify a specific table?  Can I "name" or "tag" the table object somehow so as I traverse the list of tables I can work with the table I want?

Also, please let me know if there is any documentation on working with tables, dot net examples preferred.  I had trouble getting to the Live Demos link and could not find any documentation other than brief example in the programmers reference.

Thanks!

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Tom,
You can take a look at the examples shipped with NOV - they show how to work with tables in general. There is a Tag property attached to each object in NOV, which you can use to add some identification, however it is not serialized (not written to / from RTF or other serialization formats). Alternatively you can identify tables by their position in the document using the table range:
tableWithoutCellSpacing.Range
this gives you the span of characters covered by a table.This can be used to check how tables are ordered in the document. So a way of table naming that is persistent will be to assign a tag to each table after you read it from RTF, prior to writing to create a map from position to table name and write that one along with the document. Then when you read you can assign tables their tags by going back from the position to table name. 
Hope this helps - let us know if you have any questions or meet any problems.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search