This project is read-only.

Filters like search box?

Jul 1, 2014 at 1:26 PM
Is there a way to make some kind of search box to search in grid? (Not using filters?)
Jul 1, 2014 at 1:33 PM
I have found that I will need to make my own queries and update via ajax.

Maybe anyone could suggest how could I update grid after passing specifig query to it?
Jul 28, 2014 at 4:13 AM
Hi,

You can make an ajax request for specofied address and get an new grid layout. After that replace current layout with new one.
public PartialViewResult Grid(string q)
{
    var repository = new OrdersRepository();
    var foundItems = repository.GetAll(); // or other search logic
    var grid = new OrdersGrid(foundItems );
    return PartialView("_OrdersGrid", grid);
}
sample grid view - https://gridmvc.codeplex.com/SourceControl/latest#GridMvc/GridMvc.Site/Views/Home/_OrdersGrid.cshtml

on the client side:
$.get('/path/to/grid/view?q=' + query, function(layout){
      $('#gridcontainer').html(layout);
      $(".grid-mvc").gridmvc(); // initilize grid layout (filtering)
});