We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

i can't update or refresh diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

140583 Oct 26,2018 09:19 AM UTC Oct 29,2018 11:49 AM UTC WinForms 1
loading
Tags: Diagram
Nancy
Asked On October 26, 2018 10:50 PM UTC


I have an example of a class diagram.

I consult the database and later I create the diagram for example (book, contains NRC, title), etc.
What I do is add data to the diagram but it is not reflected.


By clicking on "add property" I want you to update the diagram, Help.


my code is:

SqlDataAdapter adapter;
            SqlCommand comm;

            if (SelectType == 1)
            {
                comm = new SqlCommand("SELECT clase,atributo From Activity", con);   
            }
            else
            {
                comm = new SqlCommand("SELECT clase,atributo From Activity", con);               
            }
            adapter = new SqlDataAdapter(comm);
            System.Data.DataSet ds = new System.Data.DataSet("Table");           
            adapter.Fill(ds);

            if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = new DataTable();
                dt = ds.Tables[0];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ClassList classObj = new ClassList();
                    classObj.ClassName = dt.Rows[i]["clase"].ToString();
                    for (int j = i; j < dt.Rows.Count; j++)
                    {
                        if (dt.Rows[i]["clase"].ToString() == dt.Rows[j]["clase"].ToString())
                        {
                            if (!string.IsNullOrEmpty(dt.Rows[j]["atributo"].ToString()))
                            {
                                PropertyList propertyList = new PropertyList();
                                propertyList.PropertyName = dt.Rows[j]["atributo"].ToString();
                                classObj.PropertyList.Add(propertyList);
                            }
                            if (!string.IsNullOrEmpty(dt.Rows[j]["metodo"].ToString()))
                            {
                                MethodList methodList = new MethodList();
                                methodList.MethodName = dt.Rows[j]["metodo"].ToString();
                                classObj.MethodList.Add(methodList);
                            }
                        }
                        else
                        {
                            i = j - 1;
                            lstClass.Add(classObj);
                            break;
                        }
                        if (j == dt.Rows.Count - 1)
                        {
                            i = j;
                            lstClass.Add(classObj);
                            break;
                        }
                    }

                }
            }
            return lstClass;


but it does not work diagram.UpdateLayout();




Ramya Thirugnanam [Syncfusion]
Replied On October 29, 2018 11:49 AM UTC

Hi Nancy, 
 
We have some clarification in creating the node in diagram. Could you please confirm whether creating the Node for each data source record or applying the databinding?  
If Node is created for each record of data source in your application, then new Node should be created for adding new property. This will be suitable when group is used to show the class diagram.  
 
Regards, 
Ramya T 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;