ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: omerix on January 07, 2014, 03:42:22 am

Title: dataModel url post parameter value
Post by: omerix on January 07, 2014, 03:42:22 am
Hello,

I am taking Json data from asp file by sending some parameters in DataModel.

Datas I am sending are like 13%MK_13. I mean I am using "%" and "_" operators to use in sql and sometimes I a using Turkish characters. However if there are ascii characters, I can not send datas.

Can I send datas which are requested as additional to url,  to URL via POST method in dataModel? 


It sends below values to the file in url:
pq_curpage=1,
pq_datatype=JSON,
pq_rpp=100

I want to do the same way:
KOD= 13%MK_13
                               
Code: [Select]
dataModel: {
                                               //recIndx: "Id",
                                               location: "remote",
                                               sorting: "remote",
                                               paging: "remote",
                                               dataType: "JSON",
                                               method: "POST",
                                               //sortIndx: "Id",
                                               //sortDir: "down",
                                               colIndx:"Id",
                                               url: "json.asp?isl=Json&OZEL1=<%=Request("OZEL1")%>&OZEL2=<%=Request("OZEL2")%>&GRUP=<%=Request("GRUP")%>&KOD=<%=Request("KOD")%>",
                                               curPage: 1,
                                               rPP: 100,
                                               rPPOptions: [1, 10, 20, 30, 40, 50, 100, 500, 1000],
                                               getData: function (dataJSON) {
                                                               return {curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
                                               }
                               },
Thanks
Title: Re: dataModel url post parameter value
Post by: paramvir on January 07, 2014, 07:53:24 am
You may post additional data to url with the help of these options:

http://paramquery.com/pro/api#option-dataModel-postData

and

http://paramquery.com/pro/api#option-dataModel-postDataOnce
Title: Re: dataModel url post parameter value
Post by: bravanet on January 10, 2014, 04:29:55 pm
I wonder if you could solve your problem, I'm having the same problem, the lack of concrete examples of sending and receiving data this a bit difficult, if possible can you explain me how to solve?
Title: Re: dataModel url post parameter value
Post by: paramvir on January 10, 2014, 08:35:42 pm
bravanet

There are couple of common scenario examples in the demos where sending and receiving data is shown including client side and server side codes.

Do you have any specific requirement for sending / receiving data or are you looking for basic generalized tutorial. Please share your requirement so that I can help you in best possible way.
Title: Re: dataModel url post parameter value
Post by: paramvir on January 11, 2014, 12:30:50 am
I've added a topic on how to load local or remote data in pqGrid.

http://paramquery.com/pro/tutorial#topic-loaddata

which may be read along with reference to API and demos for better clarity & understanding.