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_Related Related Topics sp_TopicIcon
EditRow using CometD Bayeux server - (streaming service channels)
09/12/2011
16:44
Avatar
basil
New Member
Members
Forum Posts: 2
Member Since:
07/12/2011
sp_UserOfflineSmall Offline

Hi,

    I am not using a REST sever, but a channel based streaming server.... (cometd with extensions)

I would like to be able to use EditRow and get the call to the sever to be a function that I write.

function cometd_data(postdata){

       sdata=get_data(postsdata);

       grid[0].addJSONData(sdata);

       grid.jqGrid('setGridParam',{datatype:'local'});

};

function my_proxy(s.t){

     alert("my_proxy: is here");

};

function s_func(p){

     alert("edit: success function here");

     return true;

};

grid.jqGrid({
        datatype: cometd_data,
        dataProxy: my_proxy,
        useDataProxy: true,
        mtype: 'GET',
        colNames:colNames,

        .

        .

        .     

        editurl: null,

        onSelectRow: function(id) {

               if (id && id !== lastsel) {

                     grid.jqGrid('restoreRow',lastsel);
                     lastsel = id;
              }
            
             grid.jqGrid('editRow', id, true,null,s_func);

       }

}

So I have tried using the dataProxy- but the function my_proxy never gets called, nor does s_func, I get a 404 with a null page as it tries to use a non existant edit url. The dataype function works fine. What am I doing wrong?

    ( I have got the edits working by setting the edit url in the editRow function to 'clientArray' saving locally and the using the afterSave function to actually send the data to the server but I think this is rather messy and difficult to restore the original row data if the edit on the server fails)

thanks

B

 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
62 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