formatting - How to set font-weight of a column text to bold based on another column value in Telerik Grid -


i have telerik grid in based on whether istrue value true or false, need set font-weight of name text in particular row bold. tried following seem missing something.

columns.bound(d => d.istrue).width(0).htmlattributes(new { id="hdnistrue", style = "visibility:hidden;" }); columns.bound(d => d.name).clienttemplate("#<#= hdnistrue ? font-weight : bold : font-weight : normal #>#" + "# } #")                             .title("name").width(200); 

i modified code following post: telerik mvc grid making column red color based on other column value

.columns(columns =>          {columns.bound(d => d.istrue).width(0);           columns.bound(d => d.name).title("name).width(200).htmlattributes(new { style = "font-weight:normal;" });  }).cellaction(cell => {                         if (cell.column.title == "name"){                               var item = cell.dataitem;                               if(item.istrue) {                                   cell.htmlattributes["style"] = "font-weight : bold;";                               }}}).render();   

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -