remote sorting issue

40 views
Skip to first unread message

iqly...@gmail.com

unread,
Aug 25, 2013, 11:23:40 PM8/25/13
to param...@googlegroups.com
 I want change the url , the method like this:

fn._setUrl = function () {
    do something ......

        this.options.dataModel.getUrl = function () {
            return { url: this.loadUrl , data: queryString };
        }

    }

Then when I sorting this colume ,Then  url also use before. 

Paramvir Dhindsa

unread,
Aug 25, 2013, 11:30:58 PM8/25/13
to param...@googlegroups.com
you can reset the url in load event.


--
You received this message because you are subscribed to the Google Groups "paramquery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paramquery+...@googlegroups.com.
To post to this group, send email to param...@googlegroups.com.
Visit this group at http://groups.google.com/group/paramquery.
For more options, visit https://groups.google.com/groups/opt_out.

iqly...@gmail.com

unread,
Aug 26, 2013, 12:23:49 AM8/26/13
to param...@googlegroups.com
I have reset the url in load event. But the url parameter also is old.

 $(this.element).on("pqgridcrudload", function (evt, ui) {
        //debugger;
        that._setUrl();
 });


在 2013年8月26日星期一UTC+8上午11时30分58秒,paramquery写道:

Paramvir Dhindsa

unread,
Aug 26, 2013, 12:43:53 AM8/26/13
to param...@googlegroups.com
modify _setUrl method as below so that you can also change the urls.
fn._setUrl = function (queryStr, newurl) {
        this.options.dataModel.getUrl = function () {
            //debugger;
            return { url: ( newurl? newurl: this.url )+ (queryStr? queryStr : "") };
        }
    }

iqly...@gmail.com

unread,
Aug 26, 2013, 1:26:49 AM8/26/13
to param...@googlegroups.com
I'm sorry, my English is not very good, may not be stated is not clear.

this.options.dataModel.getUrl is effective. It's can change the url.

But effective timing was not right. When I click the column header,then triger then sorting meothd.

the getUrl is effective after then sorting. So I get the results is  the last operation.


在 2013年8月26日星期一UTC+8下午12时43分53秒,paramquery写道:

Paramvir Dhindsa

unread,
Aug 26, 2013, 2:30:34 AM8/26/13
to param...@googlegroups.com
Probably you need to use beforeSort event to control the timing of change in url.

iqly...@gmail.com

unread,
Aug 26, 2013, 4:33:52 AM8/26/13
to param...@googlegroups.com
It's no used. 

Do you have any demo like this. reset the url and remote sorting?

在 2013年8月26日星期一UTC+8下午2时30分34秒,paramquery写道:

Paramvir Dhindsa

unread,
Aug 26, 2013, 5:05:50 AM8/26/13
to param...@googlegroups.com
Not currently but I would put a demo for that as soon as I get time.

iqly...@gmail.com

unread,
Aug 26, 2013, 5:16:01 AM8/26/13
to param...@googlegroups.com
Thank You!

在 2013年8月26日星期一UTC+8下午5时05分50秒,paramquery写道:

iqly...@gmail.com

unread,
Aug 29, 2013, 9:45:34 PM8/29/13
to param...@googlegroups.com
I had handle this.  Need reset the url and and call it in the create function.  

I'm sorry to bother you so long.


在 2013年8月26日星期一UTC+8下午5时05分50秒,paramquery写道:

paramquery

unread,
Aug 30, 2013, 7:08:44 AM8/30/13
to param...@googlegroups.com
I'm glad you were able to find the solution.
Reply all
Reply to author
Forward
0 new messages