BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<ej:diagram id="Diagram1" runat="server" height="1000px" width="1000px">
</ej:diagram>
//creating connectors
Connector connect = new Connector();
connect.Name = "samsa";
//adding labels
Label label = new Label();
label.Text = "ram";
Diagram1.Model.Connectors.Add(connect);
<input type="button" value="updatelabel" onclick="updatelabel()" />
<script type="text/javascript">
function updatelabel() {
var diagram = $("#Diagram1").ejDiagram("instance");
var connector = diagram.model.selectedItems.children[0];
if (connector)
diagram.updateLabel(connector.name,connector.labels[0], {fillColor:"blue"});
}
</script>
Sample:http://www.syncfusion.com/downloads/support/forum/118991/updatelabel839675744.zip
Please let me know if any concerns.
Regards,
Shyam G
Query | Response |
It seems that the label does not exist until you first double-click on the connector to add the text. | Please note that by default there won’t be label added in the elements. Once the editing is completed, if an element has a label then the label will updated or else it will be added to the element. Please note that updateLabel method is applicable only when the element has a label. |