Hi,
I am trying to load default values in a dataTable row which have different views with in it. view: “combo”, all other default values in the dataTable columns show up in UI except for the below combo view where the options are loaded dynamically by a servlet call or using key, value pair . when we click on the view :combo column it shows the default value selected but the default value does not show up in the UI. when i faced the same issue previously i used refresh () and it worked , please help in this scenario.
{
id: "splitAUmember",
header: "AU Member",
view: "combo",
options:[],
minWidth: 300,
fillspace: true,
onChange: function (newVal, oldVal,
coords) {
console.log(arguments);
}
},
const tableData = [{
'splitDocType': doc,
'splitChildExtDocId': keyId,
'splitStatus': "ENTERD",
'splitAUmember': clientId,
'splitPermanent': '',
'splitPages': '',
}];
loadTableGrid($$('splitScannedResults'), tableData);
function loadAUmemberDropDown() {
var id = “splitAUmember”;
let clientId = getParameter('clientId');
let url = "ecf/BeaconPeopleDetails?clientId=" + clientId + '&' + getSessionURL();
ajaxPostDataPromise(url, {}, {}).then(function (response) {
let peopleDetailsJson = response.responseBody.PeopleDetailsResponse["people"]["client"];
if (peopleDetailsJson != null) {
let data = new Array();
let key = new Array();
for (let i = 0; i < peopleDetailsJson.length; i++) {
let bdate = peopleDetailsJson[i].birtDate;
if (bdate != "") {
data[i] = peopleDetailsJson[i].formalfullname + " - " +
bdate;
} else {
data[i] = peopleDetailsJson[i].formalfullname;
}
key[i] = peopleDetailsJson[i].clientId;
}
if (!webix.isArray(peopleDetailsJson)) {
peopleDetailsJson = [peopleDetailsJson];
}
let datasplit = [];
for (let icnt = 0; icnt < key.length; icnt++) {
datasplit.push({
id: key[icnt],
value: data[icnt]
});
}
$$("splitScannedResults")._columns[4].options = datasplit;
// $$('splitScannedResults')._columns[4]._defaultPlaceholder= clientId;
// $$('splitScannedResults')._columns[4].value= clientId;
// $$('splitScannedResults').refreshColumns();
}