html helper loading data via rest server post instead of get

1 posts, 0 answers
  1. Gareth
    Gareth avatar
    3 posts
    Member since:
    Jun 2012

    Posted 25 Jun 2012 Link to this post

    when adding a grid through the html helper and setting the datasource as noted in the documentation:

    .DataSource(dataSource => dataSource
               
    .Ajax() // Specify that the data source is of ajax type
               
    .Read(read => read.Action("Products_Read", "Home")) // Specify the action method and controller name
           
    )

    there is no way to specify the html verb for the ajax call.  by default it seems to be a post, rather than a read, so if I use a rest based service, I get a failure, as it is trying to insert a record instead of retrieve a list of them.  is there a way to specify a Get?  (actually, shouldn't the grid ajax default to a get?  it seems to when I declare the grid using jquery, but not through the html helpers.)
Back to Top