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 - gabor.pongor

Pages: [1]
1
Help for ParamQuery Pro / Re: Grid auto focus
« on: May 30, 2017, 08:38:43 pm »
Hello!

We ended up with controlling focus on the page but both solutions work perfectly.

Thank you for your help.

Regards.

2
Help for ParamQuery Pro / Grid auto focus
« on: May 29, 2017, 06:53:34 pm »
Hello!

There is a behavior in the grid in case of two way knockout binding that causes issues for us.

When data update happens and there is a selected row or cell the grid gains focus and the page scrolls to the grid.
You can reproduce this behavior with this code (tested in Chrome version 58):

Code: [Select]
<div style="height:1500px;">
   <h1>placeholder</h1><br />
   <span id="message"> </span>
</div>
<div data-bind="pqGrid: gridOptions" style="margin:auto;"></div>

Code: [Select]
var data = [
        { rank: 1, company: 'Exxon Mobil', revenues: 339938.0, profits: 36130.0 }
];

function company(obj){
        this.rank = ko.observable(obj.rank);
        this.company = ko.observable(obj.company);
        this.revenues = ko.observable(obj.revenues);
        this.profits = ko.observable(obj.profits);
    };

var items = ko.observableArray(ko.utils.arrayMap(data, function(item){
            return new company(item);
        }));

var counter = 0;

$(function () {
var gridModel = function(){
        var self = this;
        self.items = items;

        self.gridOptions = {       
            height: 'flex',
            maxHeight: 400,
            colModel: [
                { title: "Rank", dataIndx: 'rank' },
                { title: "Company", dataType: "string", dataIndx: "company",
                    filter:{ type: 'textbox', condition: 'contain', listeners: ['keyup'] }
                },
                { title: "Revenues", dataType: "float", dataIndx: "revenues" },
                { title: "Profits", dataType: "float", dataIndx: "profits" }
            ],
            title: "Knockoutjs grid",
            filterModel: {on: true, header: true},
            scrollModel: { autoFit: true },
selectionModel: { type: "row", mode: "single" },
            dataModel: { data: self.items }
        };
    };
       
    ko.applyBindings( new gridModel(), document.getElementById('koApp') );

    setInterval(function() {
         var message = "updated counter: " + ++counter;
items()[0].company(message);
$("#message").text(message);
    }, 5000);
});

Is there any way to turn this behavior off?

Thank you for your help.

Regards.

3
Help for ParamQuery Pro / Re: knockout support
« on: May 15, 2017, 02:01:26 pm »
Thank you!

I would like to suggest if possible include these files from the package of the current or the next version.
It would be easier to upgrade next time. At least for us.

Best regards.

4
Help for ParamQuery Pro / knockout support
« on: May 12, 2017, 06:37:18 pm »
Hello!

We would like to use ParamQuery grid Pro with knockout support.
Based on the demos we have to reference ko.pqgrid.min.js.

Unfortunately the downloaded package for version 3.4.0 does not contain such file or its dev counterpart.

Has the knockout support been depreciated or we just need to download these files (ko.pqgrid.min.js and ko.pqgrid.dev.js) separately from another place?

Thank you for your help.

Pages: [1]