Hi,
In my angular application I am using ejs-grid, now I want to use the drag and drop functionality to reorder the rows within grid.
Below is the code I am using - but its not working. When clicking on drag , I can drag the row but when dropping it on another row it doesn't highlights the drop area instead it shows disabled cursor and drop doesn't work.
html code-
<ejs-grid [dataSource]='data' height='350' [allowRowDragAndDrop]='true'
[selectionSettings]='selectOptions'>
<e-columns>
<e-column field='OrderID' isPrimaryKey='true' headerText='Order ID' width='80' textAlign='Right'></e-column>
<e-column field='CustomerName' headerText='Customer Name' width='120'></e-column>
<e-column field='OrderDate' headerText='Order Date' width='100' format="yMd" textAlign='Right'></e-column>
<e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right'></e-column>
<e-column field='ShipCity' headerText='Ship City' width='130'></e-column>
<e-column field='ShipCountry' headerText='Ship Country' width='130'></e-column>
</e-columns>
</ejs-grid>
ts code-
import { RowDDService, SelectionService } from '@syncfusion/ej2-angular-grids';
import { orderDetails } from './data';
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css'],
providers: [RowDDService, SelectionService]
})
ngOnInit() {
this.data = orderDetails;
this.selectOptions = { type: 'Single' };
}
package.json
"@syncfusion/ej2-angular-buttons": "^17.4.43",
"@syncfusion/ej2-angular-calendars": "^17.4.43",
"@syncfusion/ej2-angular-dropdowns": "^17.4.43",
"@syncfusion/ej2-angular-grids": "^17.4.43",
"@syncfusion/ej2-angular-heatmap": "^17.4.43",
"@syncfusion/ej2-angular-inputs": "^17.4.43",
"@syncfusion/ej2-angular-lists": "^17.4.43",
"@syncfusion/ej2-angular-navigations": "^17.4.43",
"@syncfusion/ej2-angular-popups": "^17.4.43",
"@syncfusion/ej2-angular-richtexteditor": "^17.4.43",
"@syncfusion/ej2-angular-schedule": "^17.4.43",
"@syncfusion/ej2-base": "^17.4.43",
Can you please assist me in implementing drag drop row functionality within grid?
Help much appreciated.
Thanks.
Sunita
Attachment:
dragdropejsgrid_a56b0b40.zip