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

[Solved] t-checkbox style in Razor

0 Answers 87 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
NickName
Top achievements
Rank 1
NickName asked on 30 May 2012, 01:12 PM
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.
Tags
TreeView
Asked by
NickName
Top achievements
Rank 1
Share this question
or