Grid displays double row when sorting descending

15 views Asked by At

I have decided to switch to Syncfusion for my grid because it is much more robust than Hansontables. So I rewrote my MVC program to sue Syncfusion. I am now able to display my entire database. The problem I am having is when I sort using the Id Column by descending order, each row is duplicated. It is correct when the program first loads my database and displays it in Ascending order. Here is my Index.cshtml.

    @using Syncfusion.EJ2

@Html.EJS().Grid("Grid").DataSource((IEnumerable)Model).AllowSorting().Columns(col => { col.Field("box").HeaderText(" ").EditType("booleanedit").DisplayAsCheckBox(true).Type("boolean").Width("100").Add(); col.Field("fldPrimaryKey").HeaderText("Id").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldCall").HeaderText("Call").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldDateStr").HeaderText("Date").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldTimeOnStr").HeaderText("Time").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldBand").HeaderText("Band").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldMode").HeaderText("Mode").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldState").HeaderText("State").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldRstR").HeaderText("RstR").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); col.Field("fldRstS").HeaderText("RstS").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Width("100").Add(); }).AllowPaging(true).AllowSorting(true).PageSettings(page => page.PageSize(20)).Render()

Am I missing something?

Love this new tech.

0

There are 0 answers