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 - lhohman

Pages: [1]
1
Help for ParamQuery Pro / named function on format
« on: May 21, 2020, 10:07:37 am »
Hello,

Im trying to pass a simple format and deFormat as named functions and they dont seem to work.
Code: [Select]
function pqFormatPercent(val) {
       return (val==null || val==="")? "": (pq.formatNumber(val * 100, "#,###.0") + "%");
}
function pqDeFormatPercent(val) {
       return (pq.deFormatNumber(val.split('%')[0], '#,###.00') / 100);
}

This is because my colModel comes from a JSON

Code: [Select]
"postpaid_sales": {
"align": "right",
"title": "Postpaid Sales",
"format": "pqFormatPercent",
"deFormat": "pqDeFormatPercent",
"dataIndx": "postpaid_sales",
"dataType": "float"
},

2
More and more developers are moving away from jQuery and jQueryUI in favor of native Javascript and ECMAScript.

Modern browsers can now support more powerful functions in ECMAScript which leaves jQuery as an obsolete library, it was handy in the past, but now is a bottleneck and a performance burden.

3
Help for ParamQuery Pro / Scrollbar overlaping
« on: January 23, 2020, 03:29:29 am »
We are experiencing the following visual glitches, the scrollbar is overlapping to the table, and after resizing a column, it will re-accommodate the size for the scrollbar to fit correctly.

This is happening on Chrome browser most notably, using bootstrap theme.





The following relevant options are being used:
Code: [Select]
    width: "99%",
    height: 500,
    reactive: true,
    roundCorners: false,
    stripeRows: true,
    numberCell: { show: false },
    selectionModel: { type: 'row' },
    wrap: true,
    hwrap: true,
    editable: false,
    resizable: true,
    showBottom: true,
    showTitle: true,
    title: '',
    showTop: true,
    showToolbar: true,
    scrollModel: { autoFit: true },
    pageModel: { type: "local", rPP: 50, rPPOptions: [10, 50, 100, 500, 1000] },
    collapsible: { on: false, toggle: false },

4
Using your own demo and simply changing dataIndx: ['OrderID'] and setting OrderID as the first column causes the issue that im facing, the checkboxes of the OrderID column arent showing when toggling between grouped and ungrouped using the toolbar button, and also the checked status is not conserved.


Code: [Select]
    $(function () {       
        var colM = [
            { width: 100, dataIndx: "OrderID", cbId: "chkOrder", type: "checkbox", useLabel: true },
            {
                hidden: true,
                cb: {header: true},
                dataIndx: 'chkOrder',
                dataType:'bool',
                type: "checkbox"
            },
            { title: "Customer Name", width: 130, dataIndx: "ContactName" },
            { title: "ShipCountry", width: 120, dataIndx: "ShipCountry" },           
            { title: "Freight", width: 120, format: '$##,###.00',
                summary: {
                    type: "sum"
                },
                dataType: "float", dataIndx: "Freight"
            },
            { title: "Shipping Via", width: 130, dataIndx: "ShipVia" },
    { title: "Shipped Date", width: 100, dataIndx: "ShippedDate", dataType: "date" },
            { title: "Shipping City", width: 130, dataIndx: "ShipCity" }
];
        var dataModel = {
            location: "remote",
            dataType: "JSON",
            method: "GET",
            url: "/Content/orders.json"
            //url: "/pro/orders/get",//for ASP.NET
            //url: "orders.php",//for PHP
        };
        var groupModel = {
            checkbox: true,
            checkboxHead: true,           
            on: true,
            dataIndx: ['OrderID'],                       
            menuItems: ['grandSummary'],           
            summaryInTitleRow: 'all',
            titleInFirstCol: true,
            fixCols: false,
            indent: 20,
            collapsed: [false, true],
            title: [
                "{0} ({1})",
                "{0} - {1}"
            ],
            useLabel: true
        };
        var obj = {
            height: 500,
            check: function (evt, ui) {               
             
            },
            toolbar: {
                items: [
                {
                    type: 'button',
                    label: "Toggle grouping",
                    listener: function () {
                        var on = this.option('groupModel.on');                                               
                        //toggle grouping.
                        this.Group().option({ on: !on });
                    }
                }
                ]
            },
            dataModel: dataModel,
            scrollModel: { autoFit: true },
            colModel: colM,
            numberCell: { show: false },
            menuIcon: true,                       
            groupModel: groupModel,
            showTitle: false,           
            hwrap: false,
            wrap: false
        };
        pq.grid("#grid_group_rows", obj);

    });

5
Can you check this https://jsfiddle.net/thephoenixbird/pfram1v7/113/

And tell me why the column

Code: [Select]
   {
        title: "EAN",
        type: 'checkbox',
        cbId: 'chk',
        useLabel: true,
        dataType: "string",
        width: "20%",
        maxWidth: "20%",
        align: "left",
        dataIndx: "ean"
    },

Is not showing the checkboxes checked when I toggle between grouped and ungrouped?

6
Greetings,

We are very glad usign your powerful library for our customers, while building this interface
https://jsfiddle.net/thephoenixbird/pfram1v7/113/ we found the following issues.

The requirement is to have the Update column summary to work the following way:
  • If the cell value in the Update column is null, then dont show a zero (0) on the summary cell. I have somehow managed to do this using the agg2.updates custom method
  • If the cell value in the Update column is null, then take the value of the Proposal value into the summary total sum, but keep the cell empty (cant use formulas here), in the provided jsfiddle you can see the Proposal column total summary is 2, but for the Update column the total summary value should be 6 (because of the null value cell)
  • Make the summary cells on Update column editable and be able to put a numeric value on it, which is copied over to the child cells

Also there is a toggle view button which toogles the groupModel on/off while using checkboxes on both views.


  • Pass the checked state of the rows between Grouped and unGrouped models.
  • Be able to use to obtain the checked cells between both Grouped and unGrouped models.

Which we have been using
 
Code: [Select]
checkedRows = grid.Group().getCheckedNodes().map(function(rd) { return rd; });
For the groupModel.on option, using the checkbox: true,


Hopefully you can help me to make these changes possible.

7
Help for ParamQuery Pro / Re: postData and stringify
« on: July 04, 2019, 08:03:30 pm »
Hello thanks for your support, in the same example you provided I added postData datasample and set stringify to false: http://jsfiddle.net/bvkusx8j/

If you check on the console/network tab you can see that the data sample is sent as a query string and not a JSON

8
Help for ParamQuery Pro / postData and stringify
« on: July 04, 2019, 04:27:08 am »
I'm using dataModel.postData to send some parameters in a JSON back to the server, but these parameters are serialized and converted to a query string by "stringify" thus making this very hard for me to process on my python/django backend, where everything is handled as a JSON object.

According to the documentation setting option-stringify to false, should prevent the JSON to be serialized into a query string, but isnt working.

Getting as params:
Code: [Select]
pq_datatype=JSON&lastdate=2019-06-30&firstdate=2019-06-01&where_cond%5Baxe_code%5D=!null
Expecting:
Code: [Select]
{
"lastdate": "2019-06-30",
"firstdate": "2019-06-01",
"where_cond": {
"axe_code": "!null"
}
}

Docs consulted:

https://paramquery.com/pro/api#option-dataModel-postData

https://paramquery.com/pro/tutorial#topic-remote-requests

https://paramquery.com/pro/api#option-stringify

9
ParamQuery Pro Evaluation Support / Re: Download SDK
« on: June 18, 2019, 02:43:00 am »
Hello I purchased ParamQuery Pro today, and I dont have the Pro Download link on my top menu,
Quote
Your payment for ParamQuery Pro Enterprise ( 1 developer ) has been received.

Transaction ID: 9Y************923     

Pages: [1]