|
$(function () {
var data = {
json: window.gridData, adaptor: new ej.remoteSaveAdaptor()
}
$("#Grid").ejGrid({
dataSource: data,
allowSelection: true,
allowTextWrap: true,
allowPaging:true,
allowSorting: true,
actionComplete:"complete",
allowRowDragAndDrop: true,
editSettings: { allowAdding: true, allowEditing: true, allowDeleting: true, showConfirmDialog: true },
toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Cancel] },
rowDropSettings: { dropMapper: "/Home/Data", dragBehavior: ej.Grid.DragBehavior.Move },
columns: [
{ field: "OrderID", isPrimaryKey: true, visible: true, headerText: "OrderID", width: 80, textAlign: ej.TextAlign.Right },
{ field: "CustomerID", headerText: "Grupo", width: 80, textAlign: ej.TextAlign.Right },
{ field: "EmployeeID", headerText: 'Nombre', width: 80, textAlign: ej.TextAlign.Left },
{ field: "ShipCity", headerText: 'Descripción', width: 120, textAlign: ej.TextAlign.Left },
{ field: "Freight", headerText: 'Valor', width: 80, textAlign: ej.TextAlign.Left },
{ field: "ShipCountry", headerText: 'ShipCountry', width: 150, textAlign: ej.TextAlign.Left },
]
});
|