Hi there,
In my grids, I have a column with a menu :
columns.Template(@<text></text>).Width(106).HtmlAttributes(new { @class = "templateCell" }).ClientTemplate(
Html.Kendo().Menu().Direction(MenuDirection.Left)
.Name("menu_#=AccountId#")
.Items(its =>
{
its.Add().Text("Functions:").Items(nested =>
{
nested.Add().Text(importFilesText).Action(importFilesAction, "Accounts", new { id = "#=AccountId#", cid = Model.CompanyId, returnUrl = returnUrl});
});
})
.ToClientTemplate().ToHtmlString()
);
})
But in the TreeList there is no ClientTemplate
I tried using the TemplateId
<script id="menuFolder" type="text/x-kendo-template">
@(Html.Kendo().Menu()
.Name("menu")
.Direction(MenuDirection.Left)
.Items(its =>
{
its.Add().Text("Functions:").Items(nested =>
{
nested.Add().Text("Create Rule").Url("javascript:createRule(#=Id#, #=AccountId#, #=CompanyId#);");
nested.Add().Separator(true);
nested.Add().Text("Select Account QBEAccountId").Url("javascript:SelectId(#=Id#);");
});
})
.ToClientTemplate())
</script>
And I can get the menu to display, but it is cut of inside the treelist.
In the old days with the grid we used to change the css of the parent with overflow-y:display !important; but that does not seem to work.
Any ways this can be accomplished in the treelist - next step is the items in the list are depending on the content of the row ...
Best regards,
- René