This question is locked. New answers and comments are not allowed.
Hi! What I need is to set my custom css class on checkbox container span (t-checkbox), but not checkbox itself.
Forexample background-image for checkbox depending on some model values. Is there any posibility to do it through Razor, and not in javascript. I see, that I can set custom style on node image and node link, but what about checkbox and it`s container?
Html.Telerik().TreeView()
...
mappings =>
{
mappings.For<MyEntity>(
binding => binding.ItemDataBound((item, entity) =>
{
item.Value = entity.Id.ToString();
item.Text = entity.Title;
item.Checkable = entity.IsCheckable;
item.Checked = entity.IsChecked;
item.LinkHtmlAttributes["title"] = entity.Title;
item.HtmlAttributes["style"] = "background-color: red";
@* WHAT should I write here to change t-checkbox style??? *@
}
})
...
Thank you.
Forexample background-image for checkbox depending on some model values. Is there any posibility to do it through Razor, and not in javascript. I see, that I can set custom style on node image and node link, but what about checkbox and it`s container?
Html.Telerik().TreeView()
...
mappings =>
{
mappings.For<MyEntity>(
binding => binding.ItemDataBound((item, entity) =>
{
item.Value = entity.Id.ToString();
item.Text = entity.Title;
item.Checkable = entity.IsCheckable;
item.Checked = entity.IsChecked;
item.LinkHtmlAttributes["title"] = entity.Title;
item.HtmlAttributes["style"] = "background-color: red";
@* WHAT should I write here to change t-checkbox style??? *@
}
})
...
Thank you.