Giter Club home page Giter Club logo

Comments (4)

paramquery avatar paramquery commented on September 27, 2024

Please mention what problem are you facing with local paging with an example use case.

I don't see your proposed code snippet doing anything as DM.curPage == this.dataModel.curPage

from grid.

fourteenmeister avatar fourteenmeister commented on September 27, 2024

This occurs after a dynamic update dataModel

Example:

var data1 = [];

    var obj = {
        width:700, 
        height:400, 
        title:"Grid From Array"
    };
    obj.colModel = [{
        title: "Rank", 
        width: 100, 
        dataType: "integer"
    },
    {
        title: "Company", 
        width: 200, 
        dataType: "string"
    },
    {
        title: "Revenues ($ millions)", 
        width: 150, 
        dataType: "float", 
        align: "right"
    },
    {
        title: "Profits ($ millions)", 
        width: 150, 
        dataType: "float", 
        align: "right"
    }];
    obj.dataModel = {
        location: "local",
        sorting: "local",
        data: data1,
        paging: "local",
        rPP: 5,
        rPPOptions: [5, 10, 20],
        curPage:1
    };        
    grid = object.pqGrid(obj);

data1 = [[1, 'Exxon Mobil', '339,938.0', '36,130.0'],
[2, 'Wal-Mart Stores', '315,654.0', '11,231.0'],
[3, 'Royal Dutch Shell', '306,731.0', '25,311.0'],
[4, 'BP', '267,600.0', '22,341.0'],
[5, 'General Motors', '192,604.0', '-10,567.0'],
[6, 'Chevron', '189,481.0', '14,099.0'],
[7, 'DaimlerChrysler', '186,106.3', '3,536.3'],
[8, 'Toyota Motor', '185,805.0', '12,119.6'],
[9, 'Ford Motor', '177,210.0', '2,024.0'],
[10, 'ConocoPhillips', '166,683.0', '13,529.0'],
[11, 'General Electric', '157,153.0', '16,353.0'],
[12, 'Total', '152,360.7', '15,250.0'],
[13, 'ING Group', '138,235.3', '8,958.9'],
[14, 'Citigroup', '131,045.0', '24,589.0'],
[15, 'AXA', '129,839.2', '5,186.5'],
[16, 'Allianz', '121,406.0', '5,442.4'],
[17, 'Volkswagen', '118,376.6', '1,391.7']];

        grid.pqGrid("option", "dataModel", {
            data:data1,
            location: "local",
            sorting: "local",
            paging: "local",
            rPP: 5,
            rPPOptions: [5, 10, 20],
            curPage:1
        });
        grid.pqGrid("refresh");
        grid.pqGrid("refreshDataAndView");

Try paging and you will see that the data do not change when paging.

from grid.

paramquery avatar paramquery commented on September 27, 2024

Please retest.

from grid.

fourteenmeister avatar fourteenmeister commented on September 27, 2024

Thanks. Now paging with local data work fine.

from grid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.