We are in the process of migrating from the MVC Extensions to the Kendo MVC wrappers.
We are using Server-side binding on grids, and in the old MVC Extensions, the basic CRUD methods passed the datakey as a generic "id" parameter, regardless of the actual key field name. In the Kendo wrappers it uses the actual key field name, e.g. orderID.
e.g. our old code would be something like
(View)
.DataKeys(dataKeys => dataKeys.Add(model => model.orderId))
(Controller)
public ActionResult Delete(int id) {}
It appears we have to change them to use the actual field name, e.g.
(View)
.DataSource(source => source.Server()
....Model(model =>{model.Id(o => o.OrderID);}) )
(Controller)
public ActionResult Delete(int orderID){}
Is there a way for me to force it to pass the field name = "id" somehow, e.g. as a parameter on the DataSource .Action ?
Also, we were using RouteData in some of our code to pass search values back & forth. With the Kendo MVC wrappers, the RouteData is lost between the controller & view.
Maybe I'm missing some basic difference related to RouteMaps & Kendo MVC?
Thanks for your help.
We are using Server-side binding on grids, and in the old MVC Extensions, the basic CRUD methods passed the datakey as a generic "id" parameter, regardless of the actual key field name. In the Kendo wrappers it uses the actual key field name, e.g. orderID.
e.g. our old code would be something like
(View)
.DataKeys(dataKeys => dataKeys.Add(model => model.orderId))
(Controller)
public ActionResult Delete(int id) {}
It appears we have to change them to use the actual field name, e.g.
(View)
.DataSource(source => source.Server()
....Model(model =>{model.Id(o => o.OrderID);}) )
(Controller)
public ActionResult Delete(int orderID){}
Is there a way for me to force it to pass the field name = "id" somehow, e.g. as a parameter on the DataSource .Action ?
Also, we were using RouteData in some of our code to pass search values back & forth. With the Kendo MVC wrappers, the RouteData is lost between the controller & view.
Maybe I'm missing some basic difference related to RouteMaps & Kendo MVC?
Thanks for your help.