|
let grid: Grid = new Grid({ dataSource: orderDetails,
allowPaging: true,
allowRowDragAndDrop: true,
allowSelection: true,
editSettings: { allowDeleting: true },
pageSettings: { pageCount: 2 },
width: "40%",
columns: [
{
field: "OrderID",
headerText: "Order ID",
width: 120,
textAlign: "Right"
},
{ field: "CustomerName", headerText: "Customer Name", width: 135 },
{
field: "OrderDate",
headerText: "Order Date",
width: 130,
format: "yMd",
textAlign: "Right"
}
],
rowDrop: args => { // rowDrop event which triggers when row elements are dropped.
let targetGrid: any = parentsUntil(args.target, "TestGrid", true); //target element
if (targetGrid && targetGrid.id === "TestGrid") {
var rowData = grid.getRowInfo(args.rows[0]).rowData;
testGrid.trigger("rowDrop", args);
testGrid.notify("rows-added", {
toIndex: (args.target.parentElement as any).rowIndex,
records: args.data
});
testGrid.notify("model-changed", {
type: "actionBegin",
requestType: "rowdraganddrop"
});
grid.deleteRow(args.rows[0] as any);
}
}
});
grid.appendTo("#Grid");
let testGrid: Grid = new Grid({
dataSource: [],
allowPaging: true,
allowRowDragAndDrop: true,
rowDropSettings: { targetID: "Grid" },
editSettings: { allowEditing: true, allowDeleting: true, allowAdding: true },
pageSettings: { pageCount: 2 },
width: "40%",
columns: [
{
field: "OrderID",
headerText: "Order ID",
width: 120,
textAlign: "Right"
},
{ field: "CustomerName", headerText: "Customer Name", width: 135 },
{
field: "OrderDate",
headerText: "Order Date",
width: 130,
format: "yMd",
textAlign: "Right"
}
],
rowDrop: args => {}
});
testGrid.appendTo("#TestGrid"); |
|
let grid: Grid = new Grid({ dataSource: orderDetails,
allowPaging: true,
allowRowDragAndDrop: true,
allowSelection: true,
editSettings: { allowDeleting: true },
pageSettings: { pageCount: 2 },
width: "40%",
columns: [
{
field: "OrderID",
headerText: "Order ID",
width: 120,
textAlign: "Right"
},
{ field: "CustomerName", headerText: "Customer Name", width: 135 },
{
field: "OrderDate",
headerText: "Order Date",
width: 130,
format: "yMd",
textAlign: "Right"
}
],
rowDrop: args => {
let targetGrid: any = parentsUntil(args.target, "TestGrid", true);
if (targetGrid && targetGrid.id === "TestGrid") {
var rowData = grid.getRowInfo(args.rows[0]).rowData;
testGrid.trigger("rowDrop", args);
testGrid.notify("rows-added", {
toIndex: (args.target.parentElement as any).rowIndex,
records: args.data
});
testGrid.notify("model-changed", {
type: "actionBegin",
requestType: "rowdraganddrop"
});
setTimeout(
function() {
grid.deleteRow(args.rows[0] as any);
}.bind(this),
50
);
}
}
});
grid.appendTo("#Grid");
let testGrid: Grid = new Grid({
dataSource: [],
allowPaging: true,
allowRowDragAndDrop: true,
editSettings: { allowEditing: true, allowDeleting: true, allowAdding: true },
pageSettings: { pageCount: 2 },
width: "40%",
columns: [
{
field: "OrderID",
headerText: "Order ID",
width: 120,
textAlign: "Right"
},
{ field: "CustomerName", headerText: "Customer Name", width: 135 },
{
field: "OrderDate",
headerText: "Order Date",
width: 130,
format: "yMd",
textAlign: "Right"
}
],
rowDrop: args => {
let targetGrid2: any = parentsUntil(args.target, "Grid", true);
if (targetGrid2 && targetGrid2.id === "Grid") {
var rowData = testGrid.getRowInfo(args.rows[0]).rowData;
grid.trigger("rowDrop", args);
grid.notify("rows-added", {
toIndex: (args.target.parentElement as any).rowIndex,
records: args.data
});
grid.notify("model-changed", {
type: "actionBegin",
requestType: "rowdraganddrop"
});
setTimeout(
function() {
testGrid.deleteRow(args.rows[0] as any);
}.bind(this),
50
);
}
}
});
testGrid.appendTo("#TestGrid");
|
|
let grid: Grid = new Grid({ dataSource: orderDetails,
allowPaging: true,
allowRowDragAndDrop: true,
allowSelection: true,
editSettings: { allowDeleting: true },
pageSettings: { pageCount: 2 },
width: "40%",
columns: [
{
field: "OrderID",
headerText: "Order ID",
width: 120,
textAlign: "Right"
},
{ field: "CustomerName", headerText: "Customer Name", width: 135 },
{
field: "OrderDate",
headerText: "Order Date",
width: 130,
format: "yMd",
textAlign: "Right"
}
],
rowDrop: args => { // rowDrop event which triggers when row elements are dropped.
let targetGrid: any = parentsUntil(args.target, "TestGrid", true); //target element
if (targetGrid && targetGrid.id === "TestGrid") {
var rowData = grid.getRowInfo(args.rows[0]).rowData;
testGrid.trigger("rowDrop", args);
testGrid.notify("rows-added", {
toIndex: (args.target.parentElement as any).rowIndex,
records: args.data
});
testGrid.notify("model-changed", {
type: "actionBegin",
requestType: "rowdraganddrop"
});
setTimeout( function() {
grid.deleteRow(args.rows[0] as any);
}.bind(this), 50 );
}
}
});
grid.appendTo("#Grid");
let testGrid: Grid = new Grid({
dataSource: [],
allowPaging: true,
allowRowDragAndDrop: true,
rowDropSettings: { targetID: "Grid" },
editSettings: { allowEditing: true, allowDeleting: true, allowAdding: true },
pageSettings: { pageCount: 2 },
width: "40%",
columns: [
{
field: "OrderID",
headerText: "Order ID",
width: 120,
textAlign: "Right"
},
{ field: "CustomerName", headerText: "Customer Name", width: 135 },
{
field: "OrderDate",
headerText: "Order Date",
width: 130,
format: "yMd",
textAlign: "Right"
}
],
rowDrop: args => {}
});
testGrid.appendTo("#TestGrid"); |
No, BetAndreas is not available in all countries due to legal restrictions and regulations. The site does not operate in countries where online gambling is prohibited or restricted.