public override void onInit() { sap.ui.core.routing.Router oRouter = this.getRouter(); this._oTable = this.byId <sap.m.Table>("employeesTable"); this._oVSD = null; this._sSortField = null; this._bSortDescending = false; this._aValidSortFields = new string[] { "EmployeeID", "FirstName", "LastName" }; this._sSearchQuery = null; this._oRouterArgs = null; this._initViewSettingsDialog(); // make the search bookmarkable oRouter.getRoute("employeeOverview").attachMatched(_onRouteMatched); }
public void onFilterInvoices([email protected] <sap.m.SearchField.SearchInfo> oEvent, object oData) { // build filter array List <sap.ui.model.Filter> aFilter = new List <sap.ui.model.Filter>(); string sQuery = oEvent.getParameterFor(p => p.query); if (sQuery != null) { aFilter.Add(new sap.ui.model.Filter("ProductName", sap.ui.model.FilterOperator.Contains, sQuery)); } // filter binding sap.m.Table oList = this.byId <sap.m.Table>("invoiceList"); var oBinding = oList.getBinding <sap.ui.model.ListBinding>("items"); oBinding.filter(aFilter.ToArray()); }