Question about SfDiagramComponent documentation

I'm wondering if the documentation screenshotted below is correct. See the two id values. Should they match?

I'm asking because I am particularly interested in using this feature.

https://blazor.syncfusion.com/documentation/diagram/nodes/customization

Image_2967_1730777959358



1 Reply

BR Balavignesh RaviChandran Syncfusion Team November 6, 2024 04:30 AM UTC

Hi Steve delollis,

 

it is not necessary for the template content ID to match the Node ID in the Blazor Diagram control. The NodeTemplate property allows you to define a UI segment to be rendered for a node, and you can differentiate nodes using the ID property if you want to define separate templates for each node. This means that while the Node ID is used to uniquely identify nodes, the template content does not need to have the same ID as the Node.

 

The div element’s id within the template is only for identification within the HTML structure and does not impact how the NodeTemplate is rendered. This can be useful if you want to track or style specific elements, but the rendering of the template and the binding to the node itself rely on the node’s ID property.

 

Regards,

Balavignesh R.



Loader.
Up arrow icon