mardi 26 janvier 2016

Sorting is not working in mvc

I'm using grid to show data from my data base. The problem is that sort option is not working Here is my MVCGrid code

       IEnumerable<State> st = null;
        MVCGridDefinitionTable.Add("StateGrid", new MVCGridBuilder<State>()
            .AddColumns(cols =>
                            .WithValueExpression(p => p.StateCode);
                cols.Add("StateName").WithHeaderText("State Name")
                    .WithValueExpression(p => p.StateName);                    
            .WithSorting(true, "StateName")

Aucun commentaire:

Enregistrer un commentaire