This is a migrated thread and some comments may be shown as answers.

MVC Kendo Treemap Data

1 Answer 99 Views
TreeMap
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 12 Jul 2017, 01:56 PM

Hello,

is it possible to set a C# list as data for the Kendo Treemap?

 

Thanks in advance.

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Jul 2017, 07:33 AM
Hello Stefan,

The Kendo UI TreeMap can be used with the standard C# List.

For example, if we have a model with value and text, the TreeMap can receive the following:

public static List<TreeMapValue> treeMapValue = new List<TreeMapValue>();
 
        static HomeController()
        {
            treeMapValue.Add(new TreeMapValue { ID = 1, Value = 10, text = "custom" });
        }
......
 
public ActionResult GetTreeMapValues([DataSourceRequest] DataSourceRequest dsRequest)
        {
            var result = treeMapValue.ToDataSourceResult(dsRequest);
            return Json(result);
        }

I hope this is helpful.

Regards,
Stefan
Progress Telerik
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.
Tags
TreeMap
Asked by
Stefan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or