Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141320 | Dec 5,2018 07:05 PM UTC | Dec 6,2018 07:26 AM UTC | ASP.NET Web Forms | 1 |
![]() |
Tags: Grid |
<ej:TreeGrid runat="server" ID="TreeGridControlDragAndDrop" ChildMapping="SubTasks" TreeColumnIndex="1" IsResponsive="true" AllowDragAndDrop="true" >
<columns>
<ej:TreeGridColumn HeaderText="Task Id" Field="taskID" Width="45" EditType="Numeric" AllowFiltering="false"/>
<ej:TreeGridColumn HeaderText="Task Name" Field="taskName" EditType="String" FilterEditType="String" ShowCheckbox="true"/>
. . .
</columns>
</ej:TreeGrid>
<ej:Grid ID="EmployeesGrid" runat="server" AllowPaging="true" AllowRowDragAndDrop="true">
<ClientSideEvents RowDrop="rowDropHandler" />
<Columns>
<ej:Column Field="taskID" IsPrimaryKey="true" HeaderText="Order ID" Width="100"/>
<ej:Column Field="taskName" HeaderText="Task Name" Width="100">
</ej:Column>
<ej:Column Field="startDate" HeaderText="Start Date" Format="{0:MM/dd/yyyy}" Width="100" > </ej:Column>
. . .
</Columns>
</ej:Grid>
<script>
function rowDropHandler(args){
var treeGridObj = $("#MainContent_TreeGridControlDragAndDrop").data("ejTreeGrid"); // take the ejTreeGrid instance
treeGridObj.addRow(args.data[0], ej.TreeGrid.RowPosition.Child); // add the record to treeGrid using addRow() method of ejTreeGrid
this.deleteRow()
}
</script> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.