I am using the aspx view engine with asp.net MVC 3. I have a WebGrid control that displays my selected records and pages through the selected records properly. Clicking on field header also sorts the data.
The problems:
- If am on page two and I click on any of the sortable fields, the grid reloads back to the first page after sorting. I want to keep it on the second page itself while still doing the sort.
- Next to one of the fields, 'Level' as in code below, I want to display an image , which on mouse over will display a static DIV layer behaving like a tool tip describing that field.
There don't seem to be any built in properties for doing these two things. Are there any work arounds? Here is my code:
var grid = new WebGrid(source: Model.EmployeeList, columnNames: new[] { "Name", "Level", "Department"});
grid.GetHtml(tableStyle: "table-EmpStyle", headerStyle: "tr-header", rowStyle: "webGrid-Row", alternatingRowStyle: "webGrid-alt-Row", previousText: "Previous",nextText: "Next", numericLinksCount: 0,
columns: grid.Columns(
grid.Column("Name", header: "Full Name"),
grid.Column( "Level", header: "Level" ),
grid.Column("Department", header: "Department") ))
Thanks for your time...