Group Column Count with WCF Service Binding?

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    8 posts
    Member since:
    Sep 2013

    Posted 18 Jul 2014 Link to this post

    Hello,

    Is it possible to set the group column count while using the WCF Service Binding? I tried various ways, but its not too obvious how to set the columns in this configuration. GroupColumnCount in the ascx control seems to be ignored.

    Any advice is appreciated.

    Thanks,
    Andy
  2. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 22 Jul 2014 Link to this post

    Hello,

    Here is the code that can be changed in the OrgChartNodeDataService that is setting the ColumnCount of the node:
    public OrgChartNodeData[] LoadData(OrgChartNodeData node, IDictionary<string, object> context)
       {
           var employees = GetTeams();
      
           var rows = from myRow in employees.AsEnumerable() where myRow.Field<string>("ReportsTo") == node.Id select new { values = myRow };
      
           var items = new List<OrgChartNodeData>();
      
           foreach (var row in rows)
           {
               var name = row.values.Field<string>("Team");
               var id = row.values.Field<string>("TeamID");
               var loadedNode = new OrgChartNodeData() { Id = id ,ColumnCount=2};
               loadedNode.RenderedFieldsData.Add(new OrgChartRenderedFieldData() { Text = name });
      
               items.Add(loadedNode);
           }
      
           return items.ToArray();
       }

    Hope this will be helpful.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top