dynamicly highlight row in grid or dynamicly set page of grid (JS or on server)

Apr 16, 2013 at 8:03 AM
Hi, is it please possible in JS or in controller highlight specific row in grid, for example I want to highlight row number 3 in grid.
And 2nd question is: Is it possible to dynamicly change page? For example I want to set page on grid to 3?

In JS or on server(controller).
Thank you very much.
Coordinator
Apr 16, 2013 at 8:51 AM
Hi,

You can determine the condition to apply custom css classes to grid rows and define custom css rules:
@Html.Grid(Model).Columns(...).SetRowCssClasses(item => item.Customer.IsVip ? "warning" : string.Empty);

<style>
tr.warning>td {
background-color: #FCF8E3;
}
</style>
See sample app in the repository for more infomation


What reason in dynamically changing page? Gridmvc automatically detect current page by parameters, passed to querystring. You can create custom grid pager, inherited from IGridPager interface - if you want to provide pager options not from query string source.