Drag&Drop: item goes out of the web page while dragging is off page border

I am developing Pivot table which contains fixed Field List. Field List item are draggable and everything works good. But also a can drag list items out of page border to the right and down. 
How can I make Field List items draggable in Field List container only?



Attachment: DragDrop_2aca36fc.rar

6 Replies 1 reply marked as answer

SS Saranya Sivan Syncfusion Team December 14, 2020 06:50 PM UTC

Hi Dima 
     
We are validating the reported requirement (To make field list items draggable in field list container only) at our end. We will update the further details within two business days (17th December).  
   
Regards,  
Saranya Sivan.  




SS Saranya Sivan Syncfusion Team December 17, 2020 05:19 PM UTC

Hi Dima         
Still we are validating the reported requirement (To make field list items draggable in field list container only) at our end. We will update the further details within two business days (21th December).    
     
Regards,    
Saranya Sivan.    



SS Saranya Sivan Syncfusion Team December 21, 2020 04:33 PM UTC

Hi Dima, 
We are trying to provide the solution at sample level and we will update the details on 24th December, 2020 
We appreciate your patience until then. 
Regards, 
Saranya Sivan. 
 



MM Manikandan Murugesan Syncfusion Team December 22, 2020 04:59 PM UTC

Hi Dima, 

We have prepared a sample as per your requirement. 
Code Snippet: 
export class FieldList extends SampleBase { 
    onPivotDataBound() { 
      //To restrict field list buttons 
      var ele = this.fieldlistObj.element.querySelectorAll('.e-pivot-button'); 
            for (var i=0i < ele.lengthi++) { 
                ele[i].querySelector('.e-draggable').ej2_instances[0].dragArea = this.fieldlistObj.element; 
            } 
 
      // To restrict field list treeview elements 
            this.fieldlistObj.element.querySelectorAll('.e-field-list')[0].ej2_instances[0].dragArea = this.fieldlistObj.element; 
    } 
     
    render() { 
        return (<div className="control-pane"> 
                <div className="control-section" style={overflow: 'auto' }}> 
                    <PivotViewComponent id='PivotView' ref={d => this.pivotObj = d} dataBound={this.onPivotDataBound.bind(this)}></PivotViewComponent> 
                </div> 
            </div>); 
    } 
} 
 

Please let us know if you need further assistance on this. 

Thanks, 
Manikandan 


Marked as answer

DI Dima January 18, 2021 10:39 AM UTC

Hi Manikandan, 

Sorry for my delayed answer. 
Your solution hepled me to resolve issue with dragging out of the browser window Field List items.
Thanks a lot!

Regards, 
Dima Didusenko


SS Saranya Sivan Syncfusion Team January 19, 2021 06:00 AM UTC

 
 
Thanks for the reply. 
  
Please let us know if you have any other queries. We are always happy to assist you.  
  
Regards, 
Saranya Sivan. 


Loader.
Up arrow icon