<style type="">
.detale:before {//custom toolbar icon text
content: "\e625";
}
</style>
ej.Grid.Locale["de-DE"] = {
.
.
EditFormTitle: "Korrektur von",
GroupCaptionFormat: "{{:field}}: {{:key}} - {{:count}} {{if count == 1}}pozycja{{else}}przedmiotów{{/if}}",//Group CaptionFormat values
UnGroup: "Klicken Sie hier, um die Gruppierung aufheben"
};
$(function () {
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: window.gridData,
allowPaging: true,
pageSettings: { pageCount: 5 },
allowGrouping: true,
groupSettings: { enableDropAreaAnimation: false },
locale: "de-DE",//set the localization
toolbarClick: 'clicked',
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },
toolbarSettings: {
showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel], customToolbarItems: ["detale"]//custom icon value
},
columns: [
{ field: "OrderID", headerText: "Order ID", isPrimaryKey: true, textAlign: ej.TextAlign.Right, width: 75 },
{ field: "CustomerID", headerText: "Customer ID", width: 95 },
{ field: "EmployeeID", headerText: "Employee ID", textAlign: ej.TextAlign.Right, width: 95 },
{ field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right, width: 75, format: "{0:C}" },
{ field: "ShipCity", headerText: "Ship City", width: 80 }
]
});
|
|
<style type="">
.detale:before, .details:before {//custom toolbar items
content: "\e625";
}
</style>
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: window.gridData,
allowPaging: true,
pageSettings: { pageCount: 5 },
allowGrouping: true,
groupSettings:{enableDropAreaAnimation: false},
locale: $("#language").val(),
actionBegin:function(args){
if(args.model.locale == "en-US")
args.model.toolbarSettings.customToolbarItems = ["detale"];
if(args.model.locale == "de-DE")
args.model.toolbarSettings.customToolbarItems = ["details"];
},
toolbarClick: 'clicked',
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },
toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel],customToolbarItems: ["details"]
},
columns: [
.
.
.
}); |