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.


Topics - nuno.nogueira

Pages: [1] 2
1
Help for ParamQuery Pro / Wrap sub-grid and Localization
« on: April 16, 2014, 02:36:27 pm »
Hello,

My sub-grid is initialized like:

Code: [Select]
var $grid = {
        width: 900,
        height: 300,
        flexHeight: true,
        collapsible: false,
        wrap: true,
        hwrap: false,
        resizable: false,
        rowBorders: false,
        numberCell: {
            show: false
        },
        track: true, //to turn on the track changes.
        scrollModel: {
            autoFit: true
        },
        selectionModel: {
            type: ''
        },
        //hoverMode: 'row',
        editModel: {
            saveKey: $.ui.keyCode.ENTER
        },
        showTitle: false,
        showBottom: false,
        (...)

1-The text in the sub-grid isn't wrapped when it's long although I'm using wrap:true
2- The localization isn't changed to pt-PT although I set:

Code: [Select]
$grid.pqGrid("option", $.paramquery.pqGrid.regional['pt']);
    $grid.find(".pq-pager").pqPager("option", $.paramquery.pqPager.regional['pt']);

2
Help for ParamQuery Pro / Import from Excel
« on: April 15, 2014, 02:35:24 am »
Hi there!

Eventually, a stupid question: is there any tool to import data from Excel?
Something like letting the user select certain columns from Excel into a paramquery table.

Thanks a lot for helping!


3
Help for ParamQuery Pro / How to wrap the column heading
« on: April 07, 2014, 10:56:00 pm »
How can I wrap the text of a certain column?
Eg: a long text may have 2 rows.

I tried adding a class to the column and also defining in the colModel:

Code: [Select]
{ title: '<span style="word-wrap:break-word;">'+'Saldo a 01-01-2014+'/span>' , etc....

4
Help for ParamQuery Pro / How to disable checkbox from heading
« on: April 05, 2014, 09:35:44 pm »
Hello,

I'm using the cellClick event to bind a checkbox column to the database.
Because this event isn't capturing the data when the checkbox of the heading (select/unselect all), I need to replace it by a common title.
But how can I do that?
This is the code of the column in question:
Code: [Select]
{ title: "Receber?", width:0.05*larguraJanela, dataIndx: "estado", align: "center", type:'checkBoxSelection', cls: 'ui-state-default',
            resizable: false, sortable:false}


5
Help for ParamQuery Pro / Set the width of the sub-grid columns
« on: March 18, 2014, 06:17:49 pm »
I have a variable larguraJanela to hold the width of the parent container of my grid.

This variable is adjusted automatically everytime the window width changes, so the view of the table is responsive.

It all works fine, except the width of the columns of the sub-grid.

No matter what width I set, they do not seem to bother. It's like they choose what width they want.

Here's a sample of the code:

[code]
var $grid = {
        width: larguraJanela, //900,
        height: 300,
        flexHeight: true,
        collapsible: false,
        wrap: false,
        hwrap: false,
        resizable: false,
        rowBorders: false,
        numberCell: {
            show: false
        },
        track: true, //to turn on the track changes.
        scrollModel: {
            autoFit: true
        },
        selectionModel: {
            type: ''
        },
        //hoverMode: 'row',
        editModel: {
            saveKey: $.ui.keyCode.ENTER
        },
        showTitle: false,
        showBottom: false,
        //title: "<b>Detalhes dos registos</b>",
        colModel: [{
            title: "id",
            dataType: "integer",
            dataIndx: "id",
            editable: false,
            hidden: true
        }, {
            title: "Data",
            width: 0.015*larguraJanela, //15,
            dataType: "string",
            dataIndx: "data",
            align: "right",
            resizable:false,

  (...)

{
            title: "Conta",
            width: 0.03*larguraJanela, //25,
            dataType: "string",
            dataIndx: "nome_conta",
            align: "right",
            resizable:false,
            editor: {
                type: autoCompleteEditor
            },
            validations: [{
                type: 'minLen',
                value: '1',
                msg: 'Obrigat

6
Help for ParamQuery Pro / Subtotals calculation
« on: March 11, 2014, 05:43:02 pm »
I'm using 'summary' to calculate subtotals as per your demo.

It seems, however, that when one of the values is zero or a calculated column, the subtotal isn't calculted. See Yellow marks in the attachment.

Also, I tried to add a different style to the group rows in my CSS, like:
Code: [Select]
.pq-group-row {
background-color: red !important;
}

As in the red rectangles of the attachment.

Thanks in advance for your support!  :-\


7
I get the error:

Code: [Select]
Uncaught TypeError: Cannot read property 'pq_detail' of undefined
When refreshing the data in the table.

It happens when the table is empty: I have no idea why this error is now being displayed now but it seems the table isn't properly refreshed when the table is empty.

Thanks for helping!

8
Help for ParamQuery Pro / Manage Hover behaviour in sub-grids
« on: March 07, 2014, 05:06:02 pm »
Using sub-grids, I get a hover effect I'd like to get rid of.

When the mouse is over the sub-grid, it kind of stretches (rows tremble), like in the attached video.

I tried hoverMode:'cell' and 'row' but made no difference.

See: http://youtu.be/RWG3mMB6_4E

9
Help for ParamQuery Pro / How to handle events in Grid+Sub Grid?
« on: March 06, 2014, 08:05:58 pm »
I have two grids in selector #tabela:

  • $objOrcamento is the main grid
    • $grid is the details grid

    Now I want to handle events like cellBeforeSave, load, etc for both of them but I keep receiving the error:
    Code: [Select]
    Uncaught TypeError: Object #<Object> has no method 'pqGrid'
    For example, to handle cellBeforeSave in $grid, I tried:

    Code: [Select]
    var $grid={
       //colModel, dataModel, etc...

      cellBeforeSave: function (evt, ui) {
                var isValid = $grid.pqGrid("isValid", ui);
                if (!isValid.valid) {
                    evt.preventDefault();
                    return false;
                }

       },
    }

    This isn't working, so I've tried outside var $grid:

    Code: [Select]
        $("#tabela").on("pqgridcellbeforesave", function (event, ui) {
            var isValid = $grid.pqGrid("isValid", ui);
            if (!isValid.valid) {
                evt.preventDefault();
                return false;
            }
        });

    But this is generating the same error.
    What is the correct way to handle events in multiple grids?

    Thanks in advance for your help!

    10
    Help for ParamQuery Pro / Autocomplete with categories
    « on: February 28, 2014, 05:15:34 pm »
    I need to use autocomplete with categories, since my data is hierarchical.

    From PHP I get the source in JSON, like:
    Code: [Select]
    [{"Label":"Vendas","Category":"Recebimentos"},{"Label":"Fornecedores","Category":"Pagamentos"}]
    In JS:
    Code: [Select]
    $inp.autocomplete({
            delay:0,
            source:'search.php'
            }).focus(function(){
            $(this).data("autocomplete").search($(this).val());
            })

    But this gives me an empty list although I can see the term is being searched in search.php

    Is there any way to use autocomplete with categories?

    Thanks in advance for helping!

    11
    Help for ParamQuery Pro / How to add new row to Hierarchy /Sub grid?
    « on: February 22, 2014, 01:05:18 am »
    In your demos, you show an example of a hierarchy with sub-grids.

    How do you add a new row to a certain sub-grid.

    For example, how to add a new product to Germany?

    Thanks!
     :D

    12
    Help for ParamQuery Pro / Input mask
    « on: February 13, 2014, 11:16:42 pm »
    Hi again,

    Is there any chance of using an input mask for editing rows?
    For example, I'd like to help users enter phone numbers or bank accounts.
    I have another library specific for that but can't figure out how to integrate it with colModel.

    Thanks!
     ;)

    13
    Help for ParamQuery Pro / Filter not working
    « on: February 12, 2014, 12:10:41 am »
    Hi,

    I'm replicating the "Header remote filtering" from your demos page.

    I create the filter function, then I set the filter option in column "categoria" to whatever value the user types in the box.
    I have filterModel on with headers.

    It all looks ok but it doesn't filter.

    You can see it here:
    http://www.portal-gestao.com/youbudgetz.html

    14
    Help for ParamQuery Pro / Totals for columns
    « on: February 11, 2014, 06:33:47 pm »
    Is it possible to calculate a total for certain columns without using grouping?

    I have in colModel:

    Code: [Select]
    summary:{
                type:["sum"],
                title: ["<b style='font-weight:bold;'>Total:</b> {0}"]}
                },

    Which doesn't show any total.

    If I group the 3 columns for which I want totals, it does calculate the totals but it looks really weird since these are values columns (that shouldn't be grouped).

    15
    Help for ParamQuery Pro / Prevent deleting rows having foreign keys
    « on: February 10, 2014, 04:42:58 pm »
    I want to prevent users from deleting rows from a table where there are related records in another table. I'm using MySQL.

    In PHP i have:

    Code: [Select]
    $msg=array();

        if(empty($whatever)){
            $msg['cenas']="N

    Pages: [1] 2