rowSelected: function (args) { var idEtichetta = args.data.IdEtichetta; idEtichettaSelected = idEtichetta; var gridObj = $("#GridDetail").data("ejGrid"); gridObj.model.query = ej.Query().where("IdEtichetta", "equal", idEtichetta); gridObj.refreshContent(); },
rowSelected: function (args) { var idEtichetta = args.data.IdEtichetta; idEtichettaSelected = idEtichetta; var gridObj = $("#GridProdotti").data("ejGrid"); var newDm = ej.DataManager({ url: "@(AppSettings.Value.BaseDataUrl)/odata/EtichetteXProdotto", adaptor: new ej.ODataV4Adaptor() }); var query = ej.Query().expand("Prodotto").where("IdEtichetta", "equal", idEtichetta); newDm.executeQuery(query) .done(function (e) { gridObj.dataSource(ej.DataManager(e.result)); gridObj.refreshContent(); }); },
<RowSelected Event>
rowSelected: function (args) {
this.element.ejWaitingPopup("show"); // Show the waiting popups
var employeeID = args.data.EmployeeID;
var gridObj = $("#DetailGrid").ejGrid("instance");
gridObj.commonQuery.queries = [];
gridObj.commonQuery.where("EmployeeID", 'equal', employeeID);// Modifying the query
gridObj.refreshContent(); // refresh the Grid content
this.element.ejWaitingPopup("hide");// hide the waiting popup after filter the data source
}, |
{ field: "Prodotto.Codice", headerText: "Codice", type: "string", width: 90, allowEditing: false, allowFiltering: true, headerTextAlign: "center" }, { field: "Prodotto.Descrizione", headerText: "Descrizione", type: "string", width: 300, allowEditing: false, allowFiltering: true, headerTextAlign: "center" },