Hi community, I am using primeng and I show in a table records that come from a database, I want to check my checkbox according to the response of the database, if the language is active I should load the check in true but I do not know how to access for mark it
<p-dataTable [value]="userLanguage" name="userLang" dataKey="key">
<p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
<p-column field="languageName" header="Idioma"></p-column>
<p-column field="languageId" header="Código"></p-column>
</p-dataTable>
Component:
// Obtener los idiomas del usuario
getLanguage(user){
this._userService.getLanguage(user).subscribe(
response => {
this.userLanguage = response.lstLOV;
},
error => {
console.log(<any>error);
}
);
}