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
1 Answer, 1 is accepted
0
Plamen
Telerik team
answered on 22 Jul 2014, 08:16 AM
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.