Hey guys,
I'm using only the HWA-Search of your project and it works like a charm! So first of all, thank you for this!
I would like to add a property to the template for list items.
function loadHardwareSearch() {
customSearchHardwareAsset = {
// Init code of search box
initSearch: function (searchInput) {
// Create datasource
var dataSource = customSearchLib.initDataSource(this.initCriteria);
// Set Template for list items
var template = '<div class="k-item k-widget k-state-default "><span class="k-item" style="padding-left: 0px;"><b>Name:</b> #: data.Name # </br><b>ID:</b> #: data.HardwareAssetID # </br><b>Serial:</b> #: data.SerialNumber # </br></div>';
// enableCustomSearch
customSearchLib.enableCustomSearch(searchInput, template, this.onSelect, dataSource);
},
// Criteria init code
initCriteria: function (options) {
(..)
},
onSelect: function (event,dataItem) {
(..)
}
};
app.events.publish('customSearchHardwareAssetCreated');
}
There are no changes in code (HardwareAssetSearch.js). Only in the template-string.
As you can see i tried to add the HWA-ID to the template. But when I'm doing this, no matter which property of an HWA I take, it will show me always the value "undefined".

Is it somehow possible to do something like that?
Cheers
Daniel
Hey guys,
I'm using only the HWA-Search of your project and it works like a charm! So first of all, thank you for this!
I would like to add a property to the template for list items.
There are no changes in code (HardwareAssetSearch.js). Only in the template-string.
As you can see i tried to add the HWA-ID to the template. But when I'm doing this, no matter which property of an HWA I take, it will show me always the value "undefined".
Is it somehow possible to do something like that?
Cheers
Daniel