Hello,
I am trying to create a diagram where users can edit the multiple textboxes from the html node template which I made. The html node temple consist of multiple SfTextBox components. I want to be able to save the inputs that users typed in those textboxes and load them from where ever I saved them. I am adding a little code snippet of what im currently trying to do and a picture as well. There are no errors in my code and I can get the json data as a string but I cant manage to get the text input from the html node template. I have attached an image
<SfButton OnClick="SaveDiagramClick"></SfButton>
public void SaveDiagramClick()
{
string data = Diagram.SaveDiagram();
}
Hi Fikri,
We have created a sample based on your specifications. We met your requirements by utilising the node's "AdditionalInfo" property. The AdditionalInfo property allows you to store any type of data. Assign this property to the texbox value when we save the diagram. The textbox value can be obtained from the AdditionalInfo property in Json Data. When you load the diagram, the textbox value will be properly updated. we've included a sample and a video for your reference.
Regards,
Sumathi U.
Thanks for the reply but i was trying to hold multiple textbox values in 1 node as my html templates consists of multiple textboxes. I need to serialize and deserialize them as they were so I was trying to ask is there anyway good way of doing that.
Hi Fikri,
We have achieved multiple textbox values in one node. You can serialize and deserialize that textbox values. We have shared a sample and video for your reference.
Please let us know if you need any further assistance.
Note: If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.
Regards,
Sumathi U.
Thank you for your response. Although this does work for a simple example, I was in need of a different more generic solution where I didnt have to manually iterate trough every possible textbox for the every single node in the diagram. Still I believe this will help someone other than me so I will accept the answer.
Hi Fikri,
We tried to implement generic solution but we can only accomplish this by manually iterating every textbox for every single node in the diagram. This case cannot be solved in a generic manner.
Regards,
Sumathi U.