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
Save Drag'n'Drop Grids
16/08/2011
17:21
Avatar
KevinB
Member
Members
Forum Posts: 6
Member Since:
16/08/2011
sp_UserOfflineSmall Offline

Hi,

i have added 4 Grids.

1 Grid is the pool, where all items are stored, and the three other grids are destinations.

I can Drag'n'Drop my items around. But how can i store the changes in my database?

Regards,

Kevin

17/08/2011
13:40
Avatar
KevinB
Member
Members
Forum Posts: 6
Member Since:
16/08/2011
sp_UserOfflineSmall Offline

ok, now i'm doing it this way:

jQuery("#auswahl").jqGrid('gridDnD',{connectWith:'#installiert,#laeuft,#geplant',
      ondrop: function (ev, ui, getdata)
        {
          saveDatas(ev, ui, getdata);
        }
      });
jQuery("#installiert").jqGrid('gridDnD',{connectWith:'#auswahl',
        ondrop: function (ev, ui, getdata)
        {
          saveDatas(ev, ui, getdata);
        }});
jQuery("#laeuft").jqGrid('gridDnD',{connectWith:'#auswahl',
        ondrop: function (ev, ui, getdata)
        {
          saveDatas(ev, ui, getdata);
        }});
jQuery("#geplant").jqGrid('gridDnD',{
        connectWith:'#auswahl',
        ondrop: function (ev, ui, getdata)
        {
         saveDatas(ev, ui, getdata);
        }
        });

function saveDatas(ev, ui, getdata)
      {
        var paras=new Array();
        var serial = new Array();

          //serial = serial.concat(jQuery('#auswahl').jqGrid('getRowData'));
          serial = serial.concat(jQuery('#installiert').jqGrid('getRowData'));
          serial = serial.concat(jQuery('#laeuft').jqGrid('getRowData'));
          serial = serial.concat(jQuery('#geplant').jqGrid('getRowData'));

            for(var i=0;i<serial.length;i++){
                var row=serial[i];
                paras.push($.param(row));
            }
            $.ajax({
                type: "POST",
                url: "/someurl.do",
                data: paras.join('&'),
                success: function(msg){
                    alert(msg);
                }
            });
      }

but i don't think, that is the best one 🙂

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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