Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Own plugin.
31/03/2011
19:41
Avatar
Flops
New Member
Members
Forum Posts: 2
Member Since:
31/03/2011
sp_UserOfflineSmall Offline

(function($){
        $.jgrid.extend({
            hashcontrol : function(p) {
                p = $.extend({
                    active : true
                },p || {});
                this.each(function(){
                    this.hash = true;
                    var ts = this;
                    var dt = ts.p.datatype.toLowerCase();
                    $.ajax($.extend({
                        url:ts.p.url,
                        type:ts.p.mtype,
                        dataType: dt ,
                        data: $.isFunction(ts.p.serializeGridData)? ts.p.serializeGridData.call(ts,ts.p.postData) : ts.p.postData,
                        complete: function(res,status) {
                            alert("123″);
                        }
                    }, $.jgrid.ajaxOptions, ts.p.ajaxSelectOptions || {} ));
                });
            }
        });
})(jQuery);

I`m trying to write a plugin, but i`t doesn`t wort. Where am i wrong?

Or is there any way to get loadComplete, gridComplete events?

jqGrid  3.8.2

jQuery 1.51

01/04/2011
18:41
Avatar
Flops
New Member
Members
Forum Posts: 2
Member Since:
31/03/2011
sp_UserOfflineSmall Offline

        hashcontrol : function(p) {
            p = $.extend({
                active : true
            },p || {});
            var self = this;
            return this.each(function(){
                this.hashcontroller = true;
                var loadComplete = this.p.loadComplete;
                var prop = this;
                /*rebind default loadComplete event*/
                prop.p.loadComplete = function(){
                    alert("feel!"); // my function
                    if($.isFunction(loadComplete)){
                        loadComplete.call();
                    }
                };
            });
        }

By this way i can modify default events, but it works after ajax request sended i there any way to solve this problem?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
50 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information