Grid Custom Loading Animation

Using grid mods to add custom loading animation, try to change page or filter the grid to get the loading animation, there's a Task.Delay used on the server side.
Search for something inexistent to get the "no records found" message.

Drag a column header and drop it here to group by that column
Id
Person
Food
Location
Date


Setting custom loading animation, you can see more examples here: http://tobiasahlin.com/spinkit/ (though the css may require a few modifications to adjust to the grid)
You can use a different loading animation by editing the html in awem.js (gridLoading func) and replacing css from AwesomeMvc.css or you can add another function that calls awem.gridLoading as done for the next grid.


Drag a column header and drop it here to group by that column
Id
Person
Food
Location
Date
show code
GridNoRecordsFoundCustomLoadingDemo/Index.cshtml
@(Html.Awe().Grid("CustomLoadingGrid2")
.Mod(o => o.Custom("gridLoading1").ColumnsSelector())
.Height(300)
.Resizable()
.Reorderable()
.Columns(
new Column { Bind = "Id", Width = 75, Groupable = false, Resizable = false },
new Column { Bind = "Person" },
new Column { Bind = "Food.Name" },
new Column { Bind = "Location" },
new Column { Bind = "Date", Width = 120 })
.Url(Url.Action("GridGetItems")))

<script>
function gridLoading1(o) {
return awem.gridLoading(o, { lhtm: '<div class="myspinner2"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>'});
}
// css for this grid loading (found in site.css file) has been prefixed with 'my' so it would not interfere with the css from the previous example
</script>



Comments