MVC Kendo Treemap Data

2 posts, 0 answers
  1. Stefan
    Stefan avatar
    4 posts
    Member since:
    Jul 2017

    Posted 12 Jul 2017 Link to this post


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


    Thanks in advance.



  2. Stefan
    Stefan avatar
    1595 posts

    Posted 14 Jul 2017 Link to this post

    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.

    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.
Back to Top