Assigning pre-defined items

I want to create a set of pre-defined items that can then be dragged on to the board, then I want to assign other items to these. 

Example. 

I have sections A, B, C, etc on the tools board.  A, B and C all have names, Section A, Section B and Section C.

Can I drag these items onto the canvas and maintain the name?  Once dragged on the item should be removed from the tools panel

Then, I want to be able to assign items to these sections, again maintaining their named content.

Can this be done?

1 Reply 1 reply marked as answer

GG Gowtham Gunashekar Syncfusion Team June 11, 2021 01:52 PM UTC

 
Hi John, 
 
Please refer to the following sample for how to create a set of pre-defined items into the symbol palette and when drag and drop a node from palette to diagram that node will add at same id in diagram and get removed from palette and added a button for how to add the symbol at runtime to the palette. We suggest you set the cancel argument of the OnDrop event as true and add the new node with sample id, which is stored in AddInfo of the node, in the sample we have canceled the adding dropped node and added the same node with same id property at run time and remove the node from palette using the RemovePaletteItem API of symbol palette and add the symbols to the palette using the AddPaletteItem API of the symbol palette.  
 
 
 
Regards,    
Gowtham     


Marked as answer
Loader.
Up arrow icon