Grid control basic features

The Awesome Grid control for Core and MVC is used to display data, by default using a table, but that can be changed. Documentation

It can get the data from the server by specifying the url Url(urlstr) or from a js function DataFunc(jsfunc) (the javascript function could also do an ajax request and return the promise).
The Grid (like most awesome controls) can be bound to other controls using the Parent extension (used for filtering). It can also be filtered using the api.
Mods are used to add additional features to the grid like: inline editing, automatic columns hiding and via dropdown, adaptive pager (based on window width), and more.


Other grid crud demos: Grid Crud (Popup), Grid in nest editing, Master Detail Crud Demo
<div class="bar">
@Html.Awe().TextBox("txtPerson").Placeholder("search for person ...").CssClass("searchtxt")
@Html.Awe().TextBox("txtFood").Placeholder("search for food ...").CssClass("searchtxt")
.DataFunc(Url.Action("GetCountries", "Data").CacheGetFunc())

.Mod(o => o.Main())
new Column { Bind = "Id", Width = 75, Groupable = false, Resizable = false },
new Column { Bind = "Person" },
new Column { Bind = "Food", ClientFormatFunc = "site.imgFood", MinWidth = 200 },
new Column { Bind = "Country.Name", ClientFormat = ".(CountryName)", Header = "Country" },
new Column { Bind = "Date", Grow = .1}.Mod(o => o.Autohide()),
new Column { Bind = "Location" }.Mod(o => o.Autohide()),
new Column { Bind = "Chef.FirstName,Chef.LastName", ClientFormat = ".(ChefName)", Header = "Chef" })
.Url(Url.Action("GetItems", "LunchGrid"))
.Parent("txtPerson", "person")
.Parent("txtFood", "food")
.Parent("selCountry", "country"))
public class LunchGridController : Controller
public IActionResult GetItems(GridParams g, string person, string food, int? country)
food = (food ?? "").ToLower();
person = (person ?? "").ToLower();

var list = Db.Lunches
.Where(o => o.Food.ToLower().Contains(food) && o.Person.ToLower().Contains(person))

if (country.HasValue) list = list.Where(o => o.Country.Id == country);

return Json(new GridModelBuilder<Lunch>(list, g)
KeyProp = o => o.Id,// needed for Entity Framework | nesting | tree | api
Map = o => new
Date = o.Date.ToShortDateString(),
CountryName = o.Country.Name,
ChefName = o.Chef.FirstName + " " + o.Chef.LastName

See also:

Awesome Grid Video Tutorial
Grid Client Data Demo
Grid Mailbox Demo