Thanks Jaya,
I am getting good result what we expect from using Essential Diagram Controls.
thanks to reply me.
You did not explain about my one issue..
1)Is there any way by Double Clicking, give the label to the controls like Ellispe,Rectangle.Just like we can able to give/write label to the TextNode by Double Clicking on it.
2)
Please see attachment...
we want to add our custom symbols in palatte.How to add custom symbols(Ellipse,Rectangle,Triangle) without predifined symbols.
As in pics..
Below to outer labeled Document Symbol in Palatte,without labeled symbols are added by custom code.so I want to keep those only my customised symbols.
3)
Please see attached pics..
How to give the outer label to the customised symbols which is added in palatte.
please reply me.
Thanks and Regards,
Sattar Shaikh
>Hi Sattar,
Thanks for the update.
You can save the diagram into database with node details such its name, label text and its hyperlink. For this, you need to iterate the nodes collection and create a table with required fields and finally update the fields with node's name, label's text and its hyperlink.
The following code snippet Illustrates this.
[C#]
if (this.DiagramWebControl1.Model.Nodes.Count > 0)
{
NodeCollection nodes = this.DiagramWebControl1.Model.Nodes;
foreach (Node node in nodes)
{
if (node is EmployeeSymbol)
{
EmployeeSymbol sym = node as EmployeeSymbol;
if (sym.Labels.Count > 0)
{
string datasrcpath = Server.MapPath(String.Empty);
datasrcpath = datasrcpath + @"\App_Data\employees.mdb";
string connectionstring1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + datasrcpath + ";";
OleDbConnection orgdbconnection1 = new OleDbConnection(connectionstring1);
orgdbconnection1.Open();
string orgdbinsertquery = "Insert into tbDiagram "+"(NodeName,NodeLable,NodeLink) values(@name,@label,@link)";
OleDbCommand orgdbinsertcommand = new OleDbCommand(orgdbinsertquery, orgdbconnection1);
orgdbinsertcommand .Parameters.Add("@name",OleDbType.VarChar).Value = sym.FullName;
orgdbinsertcommand.Parameters.Add("@label", OleDbType.VarChar).Value = sym.Labels[0].Text;
orgdbinsertcommand.Parameters.Add("@link", OleDbType.VarChar).Value = sym.HREF.ToString();
orgdbinsertcommand.ExecuteNonQuery();
orgdbconnection1.Close();
}
}
}
}
Sample referenceHere is a sample for your reference.
http://websamples.syncfusion.com/samples/Diagram.Web/6.1.0.34/F70134/Diagram_Web/main.htmIn the sample provided, click the button 'Save into Database' to save the nodes details into the employees.mdb.
Please let me know if you have any further questions.
Regards,
Jaya
HowtoAddOnlycustomcontrols.zip