var data = ej.DataManager({ url: 'http://localhost/phpservice/server.php/?action=get_Data', insertUrl: 'http://localhost/phpservice/server.php/?action=insert_Data', updateUrl: 'http://localhost/phpservice/server.php/?action=update_Data', removeUrl: 'http://localhost/phpservice/server.php/?action=delrec', adaptor: new ej.UrlAdaptor() |
Hi Yvan,
We suggest you to use UrlAdaptor inorder to send a POST request using ejDataManager. Please refer to the below online documentation for more information on Data Adaptors.
http://help.syncfusion.com/js/datamanager/data-adaptors
Please refer to the below online blog for a sample explaning CRUD operations in Grid control rendered using PHP.
http://www.syncfusion.com/blogs/post/Grid-Control-for-JavaScript-in-PHP.aspx
We can pass the additional parameters to the ejDataManager query as in the below code snippet.
var data = ej.DataManager({
url: 'http://localhost/phpservice/server.php/?action=get_Data',
insertUrl: 'http://localhost/phpservice/server.php/?action=insert_Data',
updateUrl: 'http://localhost/phpservice/server.php/?action=update_Data',
removeUrl: 'http://localhost/phpservice/server.php/?action=delrec',
adaptor: new ej.UrlAdaptor()
}).executeQuery(ej.Query().addParams("EmployeeID", 1).take(50));
Regards,
Ragavee U S.
$("#Grid").ejGrid({ dataSource: ej.DataManager({ url: "/api/Orders", adaptor: new ej.WebApiAdaptor() }),……... allowPaging: true, pageSettings: { pageCount: 10, pageSize: 5 }, ……………. actionBegin: "actionBegin", columns: [ ………………. ] }); function actionBegin(args) { args.model.query.addParams("MarketName", "Chennai"); // pass the additional parameter in the actionBegin event using addParams method. } </script> // Controller Side [HttpGet] public object Get() { var queryString = System.Web.HttpContext.Current.Request.QueryString; var parameter = queryString["MarketName"]; // do your stuff here. } |