jQWidgets Forums

jQuery UI Widgets Forums Plugins AngularJS Jqx-grid angular integration problems

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Jqx-grid angular integration problems #63630

    alessio.colzi
    Participant

    Hi all, i’m working on a new project and i have to decide whether to use your component.

    I’ve found a lot of problems using jqx-grid with server side paging, sorting and filtering.

    First of all, if i use jqx-settings, the grid goes in an infinite loop requesting to the server (i assume there are some wrong watches in code)

    I’m using:

    • AngularJS v1.3.1
    • JQuery v2.1.1
    • Microsoft Asp.Net MVC 5 and WebApi 2 for the backend

    Here is my code

    
    .controller('demoController', ['$scope', 'app.config', function ($scope, $appConfig) {
    
            // prepare the data
            var theme = 'classic';
            
            var source =
            {
                datatype: "json",
                datafields: [
    				{ name: 'Id' },
    				{ name: 'Aurag' },
    				{ name: 'Audte', type: 'date' }
                ],
                id: 'Id',
                cache: false,
                url: $appConfig.apiPath + 'AnagraficaCliente/Search',
                root: 'Items',
                beforeprocessing: function (data) {
                    source.totalrecords = data.TotalItems;
                }
            };
            //var dataadapter = new $.jqx.dataAdapter(source);        
    
            $scope.settings =
            {
                width: '100%',
                source: source,
                theme: theme,
                autoheight: true,
                pageable: true,
                virtualmode: true,
                rendergridrows: function(params) {
                    return params.data;
                },
                columns:
                [
                    { text: 'Id', datafield: 'Id'},
                    { text: 'Example', datafield: 'Aurag'},
                    { text: 'Date', datafield: 'Audte'}
                ]
            };
    
        }]);
    
    
    <div class="container-fluid" ng-controller="demoController">
        <jqx-grid jqx-settings="settings"></jqx-grid>
    </div>
    

    When i use dataadapter, the result is the same and the grid is not populated.

    If i use jqx-* attributes instead of jqx-settings everything seems to be fine but i get other unexpected behaviors (i’ll write it in new topics if you like)

    Any help will be appreciated.

    Thanks

    Jqx-grid angular integration problems #63636

    Peter Stoev
    Keymaster

    Hi alessio.colzi,

    How should be reproduce your issue? The demos on our website work fine with jqx-settings and there are no problems with it. I suggest you to make sure that you use the latest version of jQWidgets. In addition, the Grid’s source should point to dataAdapter instance. We’ll also check whether there’s some issue with the “rendergridrows” callback.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Jqx-grid angular integration problems #63641

    alessio.colzi
    Participant

    Hi Peter,
    i’m using jQWidgets v3.6.0.
    The issue is present when you use server side paging, your example (grid-with-jqx-settings.htm in demos folder) uses local datasource.

    To reproduce the issue maybe you can try to change url, datafields and columns to point to your php server example.

    As i wrote, i tried to use dataadapter but the result is the same and grid is not populated.

    Jqx-grid angular integration problems #63644

    Peter Stoev
    Keymaster

    Hi alessio.colzi,

    Ok. Thank you for the feedback.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.