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
drang and drop not working since /jqueryui/1.8.13
Tags: dragndrop
15/10/2011
15:41
Avatar
yvon
New Member
Members
Forum Posts: 1
Member Since:
15/10/2011
sp_UserOfflineSmall Offline

in the example, if i move one line from grid2 to grid1, it does not remove the line from grid2..

It was working well with https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js

but it does not work with https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js

Sample code :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <meta http-equiv="Content-Language" content="en" />
     <meta http-equiv="Content-Script-Type" content="text/javascript" />
         <title>test</title>
        

<link rel="stylesheet" type="text/css" media="screen" href="http://trirand.com/blog/jqgrid/themes/redmond/jquery-ui-1.8.1.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://trirand.com/blog/jqgrid/themes/ui.jqgrid.css" />

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>

<script src="http://trirand.com/blog/jqgrid/js/jquery.layout.js" type="text/javascript"></script>
<script src="http://trirand.com/blog/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script type="text/javascript">
    $.jgrid.no_legacy_api = true;
    $.jgrid.useJSON = true;
</script>
<script src="http://trirand.com/blog/jqgrid/js/ui.multiselect.js" type="text/javascript"></script>
<script src="http://trirand.com/blog/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="http://trirand.com/blog/jqgrid/js/jquery.tablednd.js" type="text/javascript"></script>
<script src="http://trirand.com/blog/jqgrid/js/jquery.contextmenu.js" type="text/javascript"></script>

<body>

 
<h1>test.html</h1>
 
 <div  class="mbLine" >
  <table id="grid1"></table><div id="pgrid1"></div>
 </div>
 <div  class="mbLine" >
  <table id="grid2"></table><div id="pgrid2"></div>
 </div>

</body>

<script type="text/javascript">
$(document).ready(function(){

jQuery("#grid1").jqGrid({
    datatype: "local",
    height: 100,
    colNames: ['Id1', 'Name1', 'Values1'],
    colModel: [{
        name: 'id1',
        index: 'id',
        width: 100
        }, {
        name: 'name1',
        index: 'name',
        width: 100
        }, {
        name: 'values1',
        index: 'values',
        width: 200
    }],
    caption: 'Grid 1',
    pager: '#pgrid1'
});
jQuery("#grid2").jqGrid({
    datatype: "local",
    height: 100,
    colNames: ['Id2', 'Name2', 'Values2'],
    colModel: [{
        name: 'id2',
        index: 'id',
        width: 100
        }, {
        name: 'name2',
        index: 'name',
        width: 100
        }, {
        name: 'values2',
        index: 'values',
        width: 200
    }],
    caption: 'Grid 2',
    pager: '#pgrid2'
});

var mydata1 = [
    {id1:"1",name1:"test1",values1:'One'},
    {id1:"2",name1:"test2",values1:'Two'},
    {id1:"3",name1:"test3",values1:'Three'}
];
var mydata2 = [
    {id2:"11",name2:"test11",values2:'One1'},
    {id2:"21",name2:"test21",values2:'Two1'},
    {id2:"31",name2:"test31",values2:'Three1'}
];

for (var i = 0; i <= mydata1.length; i++) {
    jQuery("#grid1").jqGrid('addRowData',i + 1, mydata1[i]);
    jQuery("#grid2").jqGrid('addRowData',i + 1, mydata2[i]);
 
}
jQuery("#grid1").jqGrid('gridDnD',{connectWith:'#grid2'});
jQuery("#grid2").jqGrid('gridDnD',{connectWith:'#grid1'});

});
</script>

</html>

17/10/2011
14:56
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello yvon,

how I recently answerd in the answer on the same question the problem can be fixed by modifieing of the code of the lines 372-373 of grid.jqueryui.js from

var ids = $(ui.helper).attr("id");
$($t).jqGrid('delRowData',ids ); 

to

var id = this.id;
$($t).jqGrid('delRowData',id); 

additionally the close line 351 should be changed in the same way from

var subgid = $(ui.helper).attr("id");

to

var subgid = this.id;

Probably it has sence to look in the code of jqGrid (probably only in grid.jqueryui.js) for the same problems in other places.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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