We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Attach Data Post

Thread ID:

Created:

Updated:

Platform:

Replies:

121268 Nov 25,2015 06:11 AM Nov 27,2015 05:22 AM JavaScript 3
loading
Tags: ejDataManager
Yvan Theaudin
Asked On November 25, 2015 06:11 AM

hi
I attach desired data in the POST data manager

exemple :
var dataMangerCategorie = ej.DataManager({
    url: "http://" + window.location.hostname + "/Layout/json.php?TYPE=AGENDACATEGORIE",
    crossDomain:true, 
Data : { :"1,2,3,4" , L: "99999xxxx, 88sssss}
});

Regards
Yvan

Ragavee U S [Syncfusion]
Replied On November 25, 2015 11:57 PM

Hi Yvan,

Thanks for contacting Syncfusion support.

We analyzed your requirement to pass additional parameters to the ejDataManager POST request. We suggest you to use the addParams method of ej.Query() and pass the query to executeQuery method of the ejDataManager.

The ej.Query() is used to retrieve data from the dataSource based on the query passed using the ej.Query() methods. The executeQuery method of the ejDataManager is used to execute the queries passed to it on the datamanager when remote data is bound as dataSource.

Please refer to the below online documentation for more information on the various methods available in ejDataManager and ejQuery.

http://help.syncfusion.com/js/api/ejquery#methods:addparams

http://help.syncfusion.com/js/api/ejdatamanager#methods:executequery

Regards,
Ragavee U S.

Yvan Theaudin
Replied On November 26, 2015 02:14 PM

Hi 

I just tested it sends the GET not POST
Thanks 

Attachment: img_fc87ed7e.zip

Ragavee U S [Syncfusion]
Replied On November 27, 2015 05:22 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;