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
Drag And Drop does not work
12/11/2010
23:58
Avatar
jawar
Member
Members
Forum Posts: 4
Member Since:
13/11/2010
sp_UserOfflineSmall Offline

Hi,

I'm trying to reproduce the Drag And Drop rows between grids example that you have in the Demo page... However it is not working, when I try to drag a row from one grid to another it doesn't even change the mouse cursor!

Here's my Javascript Code:

    jQuery("#gridEquipos").jqGrid({
        url:urlPagina+"&idGrid=gridEquipos",
        datatype: "json",
        mtype:'GET',
        colNames:['ID Equipo','Nombre Equipo'],
        colModel:[
                  {name:'id_equipo',index:'id_equipo', width:60},
                  {name:'nombre_equipo',index:'nombre_equipo', width:250},
                 ],
        rowNum:10,
        rowList:[10,20,30],
        pager: '#pagerEquipos',
        sortname: 'id_equipo',
        viewrecords: true,
        sortorder: "desc",
        caption: "Lista Total de Equipos",
        height:200,
        editurl:urlEditPagina
    });
    
    jQuery("#gridEquipos").jqGrid('navGrid','#pagerEquipos',{edit:false, add:false, del:false},
        {},//edit
        {},//add
        {},//delete
        {}//search
    );

    //EQUIPOS DEL TORNEO
    jQuery("#gridEquiposTorneo").jqGrid({
        url:urlPagina+"&idGrid=gridEquiposTorneo",
        datatype: "json",
        mtype:'GET',
        colNames:['ID Equipo','Nombre Equipo'],
        colModel:[
                  {name:'id_equipo',index:'id_equipo', width:60},
                  {name:'nombre_equipo',index:'nombre_equipo', width:250},
                 ],
        rowNum:10,
        rowList:[10,20,30],
        pager: '#pagerEquiposTorneo',
        sortname: 'id_equipo',
        viewrecords: true,
        sortorder: "desc",
        caption: "Equipos del Torneo",
        height:200,
        editurl:urlEditPagina
    });
    
    jQuery("#gridEquiposTorneo").jqGrid('navGrid','#pagerEquiposTorneo',{edit:false, add:false, del:true},
        {},//edit
        {},//add
        {delData:{idGrid:"gridEquiposTorneo"},
         reloadAfterSubmit:true,
         afterComplete : function(response, postdata){
                        $("#gridGrupos1").trigger("reloadGrid");
                        }
        },//delete
        {}//search
    );

//CONECTAR CON ESTILO DRAG AND DROP LOS GRIDS DE EQUIPOS
    jQuery("#gridEquiposTorneo").jqGrid('gridDnD',{connectWith:'#gridEquipos'});

And here it is what I have in the html page in the top:

<link rel="stylesheet" type="text/css" media="screen" href="assets/styles/jqueryUI/jquery-ui-1.8.6.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/styles/ui.jqgrid.css" />
<script src="/assets/scripts/i18n/grid.locale-es.js" type="text/javascript"></script>
<script src="/assets/scripts/jquery.jqGrid.min.js" type="text/javascript"></script>

am I missing something?

16/11/2010
01:46
Avatar
jawar
Member
Members
Forum Posts: 4
Member Since:
13/11/2010
sp_UserOfflineSmall Offline

Anyone?

19/11/2010
04:57
Avatar
jawar
Member
Members
Forum Posts: 4
Member Since:
13/11/2010
sp_UserOfflineSmall Offline

Can anyone give me a hand with this?

I'm kind of new with jquery... In the example it is mentioned that this feature (drag and drop) uses jquery UI draggable and droppable... Is this something that I have to add besides what I already included???

I really want this feature to work with the jqGrid...

Thanks...

19/11/2010
05:19
Avatar
jawar
Member
Members
Forum Posts: 4
Member Since:
13/11/2010
sp_UserOfflineSmall Offline

Nevermind...

After reading the documentation in the jQueryUI page... I found out I was missing one Javascript file... This one:

<script src="/assets/scripts/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script>

Thanks anyway... jqGrid is a great tool!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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