Problem with Line and remove GroupItem

3 posts, 0 answers
  1. Renato
    Renato avatar
    2 posts
    Member since:
    Mar 2017

    Posted 27 Mar Link to this post

    Hello,

    I'm using try version and I found two problem and would like your help.

    1. My line disappears when I have more four sub items (see example)

    2.This example is more difficult to explain because but I try. 

    I have structure (see image  OrgChart4.PNG) and I need that my orgChart stay as OrgChart1.PNG, group by Header (like "Operacional") but some other "Operacional" groups name are in blank.

    What is happening?

    Regars,

    Renato Vilela

     

    List<Structure> lsStructure;
     
    CreateOrg(lsStructure);
     
    private void CreateOrg(List<Structure> lsStructure){
     
    DataTable nodeTable = CreateNode(lsStructure);
                DataTable itemsTable = CreateItems(lsStructure);
     
                rocKAS.GroupEnabledBinding.NodeBindingSettings.DataFieldID = Support.GetMemberName((Structure c) => c.EnteID).ToString();
                rocKAS.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = Support.GetMemberName((Structure c) => c.EnteParentID).ToString();
                rocKAS.GroupEnabledBinding.NodeBindingSettings.DataSource = nodeTable;
     
                //Nome das Pessoas
                rocKAS.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = Support.GetMemberName((Structure c) => c.EnteID).ToString();
                rocKAS.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = Support.GetMemberName((Structure c) => c.DivisionID).ToString();
                rocKAS.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "Division" });
                rocKAS.GroupEnabledBinding.GroupItemBindingSettings.DataSource = itemsTable;
     
                rocKAS.DataBind();
                rocKAS.CollapseAllNodes();
     
    }
     
     
    private DataTable CreateNode(List<Structure> lsStructure)
            {
                DataTable nodeTable = new DataTable();
                DataRow row;
     
                nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteID).ToString(), typeof(int));
                nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteParentID).ToString(), typeof(int));
                nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.DivisionID).ToString(), typeof(int));
                nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.Division).ToString(), typeof(string));
     
                foreach (var item in lsStructure)
                {
                    row = nodeTable.NewRow();
                    row[Support.GetMemberName((Structure c) => c.EnteID).ToString()] = item.EnteID;
                    row[Support.GetMemberName((Structure c) => c.DivisionID).ToString()] = item.DivisionID;
                    row[Support.GetMemberName((Structure c) => c.Division).ToString()] = item.Division;
     
                    if(item.EnteParentID == 0)
                        row[Support.GetMemberName((Structure c) => c.EnteParentID).ToString()] = DBNull.Value;
                    else
                        row[Support.GetMemberName((Structure c) => c.EnteParentID).ToString()] = item.EnteParentID;
     
                    nodeTable.Rows.Add(row);
                }
     
                return nodeTable;
            }
     
            private DataTable CreateItems(List<Structure> lsStructure)
            {
                DataTable itemsTable = new DataTable();
                DataRow row;
     
                itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteID).ToString(), typeof(int));
                itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteParentID).ToString(), typeof(int));
                itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EntePosition).ToString(), typeof(string));
                itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.Division).ToString(), typeof(string));
                itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.DivisionID).ToString(), typeof(Int16));
                itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteName).ToString(), typeof(string));
     
                foreach (var item in lsStructure)
                {
                    row = itemsTable.NewRow();
                    row[Support.GetMemberName((Structure c) => c.EnteID).ToString()] = item.EnteID;
                    row[Support.GetMemberName((Structure c) => c.EnteParentID).ToString()] = item.EnteParentID;
                    row[Support.GetMemberName((Structure c) => c.EntePosition).ToString()] = item.EntePosition;
                    row[Support.GetMemberName((Structure c) => c.Division).ToString()] = item.Division;
                    row[Support.GetMemberName((Structure c) => c.DivisionID).ToString()] = item.DivisionID;
                    row[Support.GetMemberName((Structure c) => c.EnteName).ToString()] = item.EnteName;
                    itemsTable.Rows.Add(row);
                }
     
                return itemsTable;
            }
  2. Renato
    Renato avatar
    2 posts
    Member since:
    Mar 2017

    Posted 27 Mar in reply to Renato Link to this post

    I forgot...

    My browser is Chrome or IE11 and Telerik Trial is 2017.1.228 Feb 28, 2017

    Tks.

  3. Peter Milchev
    Admin
    Peter Milchev avatar
    297 posts

    Posted 30 Mar Link to this post

    Hello Renato,

    We have answered you in the duplicate support thread.

    Once we have any resolution on the issue there, we can share it here for convenience and better visibility from the community.

    Regards,
    Peter Milchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top