The Telerik MVC grid I am using is shown below. The data is displaying in the grid but the filterable attribute is not working, though the "Filter Icon" is displaying. I have registered the scripts and css in the layout.cshtml but I dont know why the filterable action is not working and sometimes the Column Widths are ignored and the grid is rendering in a default size.
@model IEnumerable<Customers>
@(Html.Telerik()
.Grid(Model)
.Name("Customers")
.PrefixUrlParameters(false)
.Columns(columns=>
{
columns.Bound(c => c.CustomerId).Title("CustomerId").Width(50);<br/>
columns.Bound(c => c.CustomerStatus).Title("Customer Status").Width(70);
columns.Bound(c=>c.CityId).Title("CityID").Width(50);
}
.Filterable()
.Sortable(sort=>sort.SortMode(GridSortMode.MultipleColumn))
)
布局.cshtml(登记文字和风格表):
@(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.vista.css").Combined(true).Compress(true)))
@(Html.Telerik().ScriptRegistrar().Globalization(true).DefaultGroup(group => group.Combined(true).Compress(true)))