This is a migrated thread and some comments may be shown as answers.

html helper loading data via rest server post instead of get

0 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gareth
Top achievements
Rank 1
Gareth asked on 25 Jun 2012, 05:23 AM
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.)

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Gareth
Top achievements
Rank 1
Share this question
or