Page 1 of 1

Best way to store data about data in a table cell

Posted: Thu Mar 04, 2010 4:36 pm
by JLuckey
I need to store data about the source of the data displayed in a cell in a table in a TRichView. The source data is actually the key to the record which retrieved the data displayed in the cell and is a string that looks like this:
"keyvalue1|keyvalue2|keyvalue3"

I need to be able to retrieve that key for each cell in the table in the RichView.

So my question is, where should I store that key string? In the Tag for that cell or should I create an invisible cell in each row and store it there? Or somewhere else?

Is there some example code that does something similar?

Thanks

Posted: Thu Mar 04, 2010 5:33 pm
by Sergey Tkachenko
Unfortunately, cells do not have tags or any other property allowing to store arbitrary user data.
Well, if you do not need to use file names of background cell images, you can store your data in Cell.BackgroundImageFileName property.
If you decide to do it, make sure that you do not include rvsoUseItemImageFileNames in the Options parameter of SaveHTML/SaveHTMLEx.
If you use RichViewActions, make sure that TrvActionTableProperties.StoreImageFileName=False.