|
<script type="text/javascript">
$(function () {
$.ajax({
url: "/Grid/FormalRender",
type: "POST",
success: function (result) {
$("#Grid").ejGrid({
dataSource: result.data,
columns: [
----
],
// locale: "es-CO",
---
toolbarSettings: {
showToolbar: true,
toolbarItems: [ej.Grid.ToolBarItems.Search],
customToolbarItems: [{ templateID: "#Add" }]
},
});
if (result.customtool) {
//Gets the ToolBar.
var $toolbar = $("#Grid_toolbarItems");
////Gets the tool
var li = $("#Grid_Add");
$toolbar.ejToolbar("disableItem", li);
}
},
---
});
});
</script>
|
|
<script type="text/javascript">
$(function () {
$.ajax({
url: "/Grid/FormalRender",
type: "POST",
success: function (result) {
$("#Grid").ejGrid({
dataSource: result.data,
columns: [
----
],
// locale: "es-CO",
---
toolbarSettings: {
showToolbar: true,
toolbarItems: [ej.Grid.ToolBarItems.Search],
customToolbarItems: [{ templateID: "#Add" }]
},
});
if (result.customtool) {
var gridObj = $("#Grid").data("ejGrid");
gridObj.hideColumns("Employee ID"); // hide the columns in Grid then disable the custom toolbar items.
//Gets the ToolBar.
var $toolbar = $("#Grid_toolbarItems");
////Gets the tool
var li = $("#Grid_Add");
$toolbar.ejToolbar("disableItem", li);
}
},
---
});
});
</script>
|