Im testing grid widget for angular 5.
I have problems with addrow function. When you call to this this.myGrid.addrow(null, this.data); this refreses the grid with a new row. I have tested this succesfully in other components. Now im testing this function in a new component and i dont know why when i call the first time it adds the new row correctly but when i add a second one it adds the second new row twice and the first row disappear. If add a third one it happens the same. The new third row appears 3 times …
Any idea?
Im using this always in all components and usually works:
dataAdapter: any = new jqx.dataAdapter(this.source);
localization: any = this.idioma.getLocalizationGrid('ES');
columns: any[] = [
{ text: 'Nombre', datafield: 'nombre' },
{ text: 'Descripción', datafield: 'descripcion' }
];
datos: Perfil[] = [];
source: any = {
localdata: this.datos,
datatype: 'array',
datafields: [
{ name: 'nombre', type: 'string' },
{ name: 'descripcion', type: 'string' }
],
id: 'nombre',
url: this.getPerfilesAplicacion(this.unidad, this.aplicacion)
};