|
const lookupObj = new DropDownList({
change: e => {
console.log("e", e);
},
dataSource: sportsData,
fields: { text: "Game", value: "Id" }
}); |
|
write: args => {
const lookupObj = new DropDownList({
change: e => {
console.log("e", e);
},
dataSource: this.searchData,
fields: { text: "Country", value: "CustomerID" },
allowFiltering: true,
filtering: e => {
let query = new Query().select(["Country", "CustomerID"]);
query =
e.text !== ""
? query.where("Country", "startswith", e.text, true)
: query;
e.updateData(this.searchData, query);
}
});
const objElement = document.querySelector("#" + args.element.id);
lookupObj.appendTo("#" + args.element.id);
} |
|
searchData = new DataManager({
adaptor: new ODataV4Adaptor(),
crossDomain: true,
});
…………..
…………..
dataSource: this.searchData, |
|
public searchData = new DataManager({
adaptor: new UrlAdaptor(),
crossDomain: true,
url: "Home/UrlDatasource1",
requestType: "POST"
});
……….
write: (args: { element: Element, column: Column }) => {
const lookupObj = new DropDownList({
change: e => {
console.log("e", e);
},
dataSource: this.searchData,
fields: { text: "ShipCountry", value: "ShipCountry" },
allowFiltering: true,
filtering: this.onFiltering.bind(this),
query: new Query().addParams('Skip', '0').addParams('Take', '5')
});
const objElement = document.querySelector("#" + args.element.id);
lookupObj.appendTo("#" + args.element.id);
} |