Posted 15 November 2018, 6:30 pm EST
Thanks Sharad,
I’m running into issues w/ my first question since for our datamaps we aren’t actually using a , but rather we are setting a dataMap inside of a .
Given this, in Angular 6 how do I add [isEditable]=“false” to my datamap? I’ve tried adding it on the datamap and also on the , but both failed with errors that .isEditable is not a property of wj-flex-grid-column and wj-flex-grid.
Is it possible to set [isEditable] to ‘false’ inside of a ? Here’s an example of my code:
my.component.html
<wj-flex-grid #m_grid [keyActionTab]="'CycleOut'" [allowAddNew]="true" [itemsSource]="m_collectionView" (initialized)="initGrid(sender, event)">
<wj-flex-grid-column [header]="'myDataMapColumn'" [binding]="'myDataMapColumn'" [width]="155" [visible]="true"
[isReadOnly]="false" [dataMap]="dataMap_0"
></wj-flex-grid-column>
</wj-flex-grid>
my.component.ts
public dataMap_0;
ngOnInit() {
this.loadData();
this.mapData();
}
// --------------------------------------------------------------------
mapData() {
var data =
[
{ "apiPath": this.m_myApiPath, "FieldName": "test" }
// 0
];
this.mapData_0(data[0]);
}
// --------------------------------------------------------------------
mapData_0(p_data) {
this.dbService.get(p_data.apiPath)
.subscribe
(
data => {
// data.unshift({ ID: 0, appID: 0, appName: "---" });
this.dataMap_0 = new this.m_wjcGrid.DataMap(data, p_data.FieldName + "ID", p_data.FieldName);
},
errorCode => {
console.log('errorCode: ' + errorCode);
}
);
}