3
Vote

Sorting/Filtering Attributes not working?

description

I am using Grid.MVC in several areas of my MVC5 application (Bootstrap3/EntityFramework6) and recently noticed that I no longer have the option to Filter/Sort my columns as I previously could.

I am implementing the Grid attributes sometimes explicitly through custom Columns on the View, and other times using AutoGenerateColumns() to load from the Model DataAnnotations on the Model:
@Html.Grid(Model).Columns(columns =>
        {
            columns.Add().Encoded(false).Sanitized(false).RenderValueAs(o => o.Name).Titled("Name").Sortable(true).Filterable(true).SetWidth(100);
        }).WithPaging(10)

// Setting GridColumn Annotations allows you to use AutoGenerateColumns on view to auto create the Grid based on the model. https://gridmvc.codeplex.com/
        [Display(Name = "Name")]
        [GridColumn(Title = "Name", SortEnabled = true, FilterEnabled = true, Width = "100")]
        public string Name { get; set; }
In either case, my Grid columns are now showing simply bolded Headers, not allowing me the option to Filter/Sort. Any ideas what may be causing this?

comments

mumairanwaar wrote Nov 1, 2016 at 7:31 AM

Bro I am also facing this, have u done this ??