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
saverow from a href click
23/09/2008
11:17
Avatar
bouton
Member
Members
Forum Posts: 12
Member Since:
30/11/2007
sp_UserOfflineSmall Offline

I have a multiselect gridtable with a link below to "save rows". But when I click on that link it doesn't save. I've checked w/ firebug and nothing is being sent... But when I do an alert, the values are there. Obviously I've got something wrong.

note - the ID is text and not an interger

Any hints?

jQuery("#newGrid").jqGrid({
          url:'get.php?q=30'
        , editurl: getr.php?q=31'
        , datatype: "json"
        , mtype: 'GET'
        , loadtext: "Loading..."
        , colNames:['Value']
        , colModel:[
              {name:'thevalue', index:'thevalue', width:198}
        ]
        , sortname: 'thevalue'
        , sortorder: "asc"
        , pgbuttons: false
        , pginput: false
        , viewrecords: false
        , rowList: []
        , height: '100%'
        , multiselect: true
        , pager: jQuery('#newPager')
        , imgpath: '/custom/javascript/jquery-1.2.6/jqGrid/themes/basic/images'
        , caption: 'Experiments'
        , width: "700"
        , height: '100%'
      }).navGrid("#newPager",{search:false,refresh:true,edit:false,add:false,del:false,position:'right'});
      
    jQuery("#makeNew").click( function() {
          var s;
          s = jQuery("#newGrid").getGridParam('selarrrow');
                for (x in s) {
                  var ret = jQuery("#newGrid").getRowData(s[x]);
                  var thevalue= ret.thevalue;
                  alert(thevalue);
                  jQuery("#newGrid").saveRow(thevalue);
        }
    });

thanks

23/09/2008
13:02
Avatar
YamilBracho
Member
Members
Forum Posts: 124
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

Hi.

You have to call your server code by yourself using an AJAX call or a window.open() javascript. For example in a custom button I export my grid to excel and then I use window.open to call a server side code this way:

         function showReportWindow(tipo) {
             var url = "/DomiciliacionPagos/Sector?oper=" + tipo;
             window.open(url, "popup", "width=600,height=600");
         }   

HTH

24/09/2008
04:49
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You mix inline edit with pure grid data.

You should make your own ajax call to save data this way.

Reagrds

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

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