This question is locked. New answers and comments are not allowed.
I have a class as follows:
public class RateGroupDTO
{
[ScaffoldColumn(false)]
public int RateGroupId { get; set; }
public string RateGroupName { get; set; }
}
and in the Model, I have a property called
[UIHint("RateGroup")]
public RateGroupDTO RateGroupDTO { get; set; }
The display template(~/DisplayTemplates/RateGroup.ascx) is as follows:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BookingEngine.Model.DTO.SearchResults.DTOs.RateGroupDTO>" %>
<%= Html.Encode(Model.RateGroupName) %>
The Editor template(~/EditorTemplates/RateGroup.ascx) is a s follows:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BookingEngine.Model.DTO.SearchResults.DTOs.RateGroupDTO>" %>
<% if(Model != null ){ %>
<%= Html.Telerik().DropDownList()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.BindTo(new SelectList((IEnumerable)ViewData["RateGroupsDTOs"], "RateGroupId", "RateGroupName",
Model.RateGroupId.ToString()))
%>
<%} else{%>
<%= Html.Telerik().DropDownList()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.BindTo(new SelectList((IEnumerable)ViewData["RateGroupsDTOs"], "RateGroupId", "RateGroupName"))
%>
<% } %>
and in the view, I have a grid with following column :
columns.Bound(p => p.RateGroupDTO).Width(70).Title("Rate<br/>Group<br/>Name");
The sorting and filtering are enabled for the grid, but the filtering box for this column(RateGroupDTO) is all emtpy. Also, the sorting on this column throws an error.
Please let us know how to make sorting and filtering work for this column with server edit template.
public class RateGroupDTO
{
[ScaffoldColumn(false)]
public int RateGroupId { get; set; }
public string RateGroupName { get; set; }
}
and in the Model, I have a property called
[UIHint("RateGroup")]
public RateGroupDTO RateGroupDTO { get; set; }
The display template(~/DisplayTemplates/RateGroup.ascx) is as follows:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BookingEngine.Model.DTO.SearchResults.DTOs.RateGroupDTO>" %>
<%= Html.Encode(Model.RateGroupName) %>
The Editor template(~/EditorTemplates/RateGroup.ascx) is a s follows:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BookingEngine.Model.DTO.SearchResults.DTOs.RateGroupDTO>" %>
<% if(Model != null ){ %>
<%= Html.Telerik().DropDownList()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.BindTo(new SelectList((IEnumerable)ViewData["RateGroupsDTOs"], "RateGroupId", "RateGroupName",
Model.RateGroupId.ToString()))
%>
<%} else{%>
<%= Html.Telerik().DropDownList()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.BindTo(new SelectList((IEnumerable)ViewData["RateGroupsDTOs"], "RateGroupId", "RateGroupName"))
%>
<% } %>
and in the view, I have a grid with following column :
columns.Bound(p => p.RateGroupDTO).Width(70).Title("Rate<br/>Group<br/>Name");
The sorting and filtering are enabled for the grid, but the filtering box for this column(RateGroupDTO) is all emtpy. Also, the sorting on this column throws an error.
Please let us know how to make sorting and filtering work for this column with server edit template.