Hi,
I have a problem setting correctly the treemap.
Everything works now, but I would like to change some tile aspect based on the tile properties (name, value).
This is my actual implementation:
("#treemap").kendoTreeMap({
dataSource: datasource,
autoBind: true,
valueField: "value",
textField: "name",
colorField: "color",
type: treemaptype,
itemCreated: function (e) {
},
dataBound: function (e) {
// Total + Groups
if (e.node) {
var element = this.findByUid(e.node.uid);
element.css("background-color", e.node.color);
// to set back the original color
}
}
}).on("click", ".k-leaf, .k-treemap-title", function (e) {
var item = $("#treemap").data("kendoTreeMap").dataItem($(this).closest(".k-treemap-tile"));
alert(item.name)
});
I have understood that itemCreated event cannot be used, because data are not yet bound to the item, and we can only change some css property.
In ASP we can implement a Server-side procedure to do that.
What I can do in MVC ?
Thank you