EasyUI Forum
March 04, 2026, 06:13:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: Is it possible to add Ondrag, OndragStart, OndragStop event to 'tree' structure? on: September 28, 2012, 03:20:09 AM
Hey... do you have any solution to restrict any node to move away from its parent... and also restrict node to go into any node... in drag drop feature in tree... plz help ASAP....
2  General Category / General Discussion / Is it possible to add Ondrag, OndragStart, OndragStop event to 'tree' structure? on: September 26, 2012, 04:15:34 AM
I want these events to validate whether to allow that particular node to drop or not... plz help...
thanks..
3  General Category / General Discussion / Re: Is it possible to use drag and drop in datagrid and save the data in new order on: September 26, 2012, 04:08:00 AM
plz provide idField:'id' to data grid
4  General Category / General Discussion / Re: Is it possible to use drag and drop in datagrid and save the data in new order on: September 18, 2012, 06:06:49 AM
To get whole position of the datagrid after drag and drop use following code...

$('#dg').datagrid({
             onLoadSuccess:function(){
                $(this).datagrid('enableDnd');
             },
             onDrop:function(destRow,sourceRow,point){
                                
                var newPosIds = [];                        
                
                $('#dg').datagrid('selectAll');
                
                var rows = $('#dg').datagrid('getSelections');                                
                
                for(var i=0; i<rows.length; i++){                     
                   newPosIds.push(rows.id);                       
                }
                
                alert(newPosIds);
                
                $('#dg').datagrid('unselectAll');
                
             }
          });

newPosIds gives you New Position of all ids of the grid...
Hope it will help you...
Enjoy!!!!!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!