<div style="float:left;width:50%">
<%-- Source Grid--%>
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" AllowRowDragAndDrop="true" Selectiontype="Multiple">
<RowDropSettings DropMapper="GridFeatures.aspx/Reordering" DropTargetID="DestGrid"/>
<PageSettings ShowDefaults="false" PageSize="9" EnableTemplates="true" Template="#pagerTemplate" />
<EditSettings AllowEditing="true"/>
<Columns>
………………………………………
</Columns>
</ej:Grid>
</div>
<%--Destination Grid--%>
<div style="float:right;width:49%">
<ej:Grid ID="DestGrid" runat="server" AllowPaging="True" AllowRowDragAndDrop="true" Selectiontype="Multiple">
<RowDropSettings DropMapper="GridFeatures.aspx/Reordering"/>
<PageSettings ShowDefaults="false" PageSize="9" EnableTemplates="true" Template="#pagerTemplate" />
<Columns>
<ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="50" />
<ej:Column Field="CustomerID" HeaderText="Customer ID" Width="70" />
<ej:Column Field="EmployeeID" HeaderText="Employee ID" TextAlign="Right" Width="70" />
<ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Width="50" Format="{0:C}" />
</Columns>
<ClientSideEvents BeforeRowDrop="beforedrop" />
</ej:Grid>
</div>
function beforedrop(args) {
if (args.draggedRecords[0].OrderID > 10003)
args.cancel = true;
//prevent the default action by enabling the args.cancel
} |