Hi,
We are using Ojet 7.2.0. We have check box to select rows in ojet table. header checkbox selection (ie select All) is not working with this version. Can you please guide. Please find the code. below. Please take this as high priority. I tried in 7.2.0 version of cookbook also. It is not working.
this.columnArray = [{ "headerTemplate": "headerCheckTemplate",
"headerText":"Select All",
"template": "checkTemplate",
"sortable": "disabled"
},
{"headerText": "Instrument Code",
"field": "instrumentCode"},
{"headerText": "Instrument Name",
"field": "instrumentName"},
{"headerText": "Instrument Type Code",
"field": "instrumentTypeCode"},
{"headerText": "InstrumentType Desc",
"field": "instrumentTypeDesc"},
{"headerText": "CounterParty Name",
"field": "counterPartyName"},
{"headerText": "Currency Code",
"field": "currencyCode"}
];
<template slot="headerCheckTemplate" >
<oj-checkboxset value='[[headerCheckStatus]]'
on-value-changed='[[headerCheckboxListener]]'
class='oj-checkboxset-no-chrome oj-selection-checkbox'
id="table_header_checkbox">
<oj-option aria-label="Checkbox Select All" value="checked"></oj-option>
</oj-checkboxset>
this.headerCheckboxListener = function (event) {
if (event.detail != null) {
var value = event.detail.value;
if (value.length > 0) {
if(self.masterInstrumentList().length!=0){
for(var i=0;i<self.masterInstrumentList().length;i++){
this.selectedItems.add([self.masterInstrumentList()[i].instrumentCode]);
self.selectedInstArray.push(self.masterInstrumentList()[i].instrumentCode);
}
}
} else if (value.length === 0 && event.detail.updatedFrom == 'internal') {
this.selectedItems.clear();
self.selectedInstArray([]);
}
}
}.bind(this);