jQWidgets Forums

jQuery UI Widgets Forums Angular addrow

This topic contains 1 reply, has 2 voices, and was last updated by  Ivo Zhulev 7 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    addrow Posts
  • addrow #97915

    rubenfernande3
    Participant

    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)
      };
    addrow #97929

    Ivo Zhulev
    Participant

    Hi rubenfernande3,

    From the info given I cant determine where the problem lies. As you said you are using the same code in several places and only here it fails, so maybe the problem comes from somewhere else. Can you make a minimalistic demo which can show the problem and share that demo?

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.