Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - roundy72

Pages: [1]
1
here's what I did, may it help you or someone in the future:

        var dataM = {
            data: tmpJSON,
            location: "local",
            sorting: "local",
            paging: (tmpJSON.length <= 10 ? null : "local"),  //hide paging if 10 or less results
            dataType: "JSON"
        };

        var grid1 = $("div#gridContainer").pqGrid({
            dataModel: dataM  ...

2
Help for ParamQuery Grid (free version) / local JSON help
« on: August 29, 2014, 01:27:24 am »
hello all!  can someone tell me what i'm doing wrong here?  this keeps giving me an error "Object doesn't support property or method 'slice'".
I'm using the simplest JSON possible (from MSDN site):


var colM = [
                        { title: "Phone", width: 100, dataType: "string", editable: false }
                    ];

                    var jsontext = '{"data":["555-0100","555-0120"]}';
                    var contact = JSON.parse(jsontext);
                   
                    var dataM = {
                        data: contact,
                        location: "local",
                        sorting: "local",
                        paging: "local"
                    }

                    var grid1 = $("div#grid_local_sorting").pqGrid({
                        width: 976,
                        height: 300,
                        collapsible: false,
                        pageModel: { type: "local", rPP: 20, strRpp: "{0}", strDisplay: "{0} to {1} of {2}" },
                        selectionModel: { swipe: true },
                        dataModel: dataM,
                        colModel: colM,
                        wrap: false, hwrap: false,         
                        numberCell: { show: false, resizable: true, title: "#" },
                        title: "Search Results",
                        resizable: true
                    });




my ultimate goal is to use the dataIndx property so I can specify which data appears where in the columns, like this:

var jsontext = '{"data":[{ "phone1" : "555-0100", "phone2" : "555-0120" }]}';
...
var colM = [
    { title: "Primary Phone", width: 100, dataType: "string", editable: false, dataIndx: "phone1" }
];

... expecting 555-0100 to show...





Pages: [1]