Note that there are some explanatory texts on larger screens.

plurals
  1. POKendo UI Grid different detail templates depending on condition
    text
    copied!<p>I have such grid defined</p> <pre><code>@(Html.Kendo().Grid&lt;FieldViewModel&gt;(Model.Fields) .HtmlAttributes(new { @class = "fullScreen" }) .Name("formFields") .ClientDetailTemplateId("formFieldsTemplate") .Columns(columns =&gt; { columns.Bound(e =&gt; e.Key); columns.Bound(e =&gt; e.DisplayName); columns.Bound(e =&gt; e.FieldTypeName); columns.Bound(e =&gt; e.Order); columns.Bound(e =&gt; e.IsMandatory); columns.Bound(e =&gt; e.Type); }) .Pageable() .Sortable() .Scrollable() .Selectable() .Resizable(resize =&gt; resize.Columns(true)) .Groupable() .Filterable() .DataSource(dataSource =&gt; dataSource.Ajax().ServerOperation(false).Model(model =&gt; model.Id(e =&gt; e.Key)))) </code></pre> <p>and details template</p> <pre><code>&lt;script id="formFieldsTemplate" type="text/kendo-tmpl"&gt; @(Html.Kendo().Grid&lt;FieldViewModel&gt;() .Name("FormField_#=Key#") .ClientDetailTemplateId("formFieldsTemplate") .Columns(columns =&gt; { columns.Bound(e =&gt; e.Key); columns.Bound(e =&gt; e.DisplayName); columns.Bound(e =&gt; e.FieldTypeName); columns.Bound(e =&gt; e.Order); columns.Bound(e =&gt; e.IsMandatory); columns.Bound(e =&gt; e.Type); }) .DataSource(dataSource =&gt; dataSource.Ajax().Read(read =&gt; read.Action("LoadFieldDetails", "Forms", new { formPath = Model.Schema, rootElementName = Model.Root ,fieldKey = "#=Key#" }))) .Pageable() .Sortable() .Selectable() .ToClientTemplate()) &lt;/script&gt; </code></pre> <p>As you can see I have <code>Type</code> property (of type int), so what I want to do is not to show any details view and no arrow on the entire row when <code>Type</code> property is set to the specific value. How can I achieve it?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload