Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserve Cell, Row and Column TAGS during Save and Load #496

Open
CanadianHusky opened this issue Mar 21, 2023 · 0 comments
Open

preserve Cell, Row and Column TAGS during Save and Load #496

CanadianHusky opened this issue Mar 21, 2023 · 0 comments

Comments

@CanadianHusky
Copy link

Describe the feature

Currently worksheet.Save and .Load methods with FileFormat.ReoGridFormat save and load worksheet data in XML format.
The xml contains additional data about row/column size and borders etc.

Would it be possible to include Cell, Row and Column TAG object serialization into the RGF Format and preserve all object tags during Load and Save operation ?
In my scenario the tags will contain certain business objects which are not represented visually, but are needed for the functionality.

I would imagine the following options and functionality:

    Public Delegate Function TagSerializer(Of T)(input As T) As String
    Public Delegate Function TagDeSerializer(Of T)(xmlstring As String) As T

all the Grid Save/Load functions would do is check if a Tag objects exists, and if it does pass in the Object to the Serializer Delegate, get a string back and write that as an XML Attribute. What the serialized content is does not matter. The user function would be responsible for deserialization. So even a JSON String could be used which is leaner than XML

In the generated XML it could look like this

<cells>
    <cell row="0" col="0" tag="xml or json string for cell tag">Test1</cell>
 </cells>

same for rows and columns

<rows>
    <row row="4" height="52" last-height="20" auto-height="false" tag="xmlstring" />
 </rows>
  <cols>
    <col col="1" width="128" last-width="70" tag="xmlstring"/>
  </cols>

Which edition of ReoGrid is targeted

  • Windows Form

The control is brilliant and a hidden gem.
Thank you for the great work and Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant