Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Issue with setting pageSize and "dataBind" or setting "dataSource" option overwrites it with last value of pageSize?
posted

We tried to set the pageSize before reloading ( "dataBind" ) the grid.
From the debugging we did, it was noticed that right after setting the new dataSource (even though the dataSource itself has the new value of the pageSize ) the last value is applied again so what we see in the UI is flicker.
For a second or so the new ( "25" ) size is set and right after that the grid goes to the previous old value.


                                var jsonPDataSourceOptions = {
                                    urlType: 'remoteUrl',
                                    dataSource: ajaxUrl,
                                    paging: {
                                        enabled: true,
                                        pageSize: 25
                                    },
                                    responseDataKey: 'd.results.data'
                                };

                                var igDs = new $.ig.JSONPDataSource(jsonPDataSourceOptions);
                                igDs.pageSize(25);
                                self.options.gridOptions.dataSource = igDs;
                                
                                
                                $(self.options.jobsGridSelector, self.element).igGrid("option", "dataSource", igDs);
                                $(self.options.jobsGridSelector, self.element).igGrid("dataBind");

Parents
  • 23953
    Offline posted

    Hi Georgi,

    We have an internal bug that states: igGridPaging doesn't take into account paging options of the $.ig.DataSource instance and overrides them.

    I guess you are observing the same thing.

    I'm not sure what is the case which you're trying to achieve, so I'm not able to think of a good solution.

    The first thing that comes into my mind is to call $("#grid1").igGridPaging("option", "pageSize", 5); but that will make an additional AJAX request to the server.

    Another solution is to recreate the grid with the correct page size set in the igGridPaging options.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

Reply Children
No Data