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

Pages: [1]
1
ParamQuery Pro Evaluation Support / Re: Paginate Event
« on: September 21, 2016, 04:38:40 am »
There is a possibility to click the page event using as values ​​as shown below
Code: [Select]
var data = [
            { rank: 1, company: 'Exxon Mobil', revenues: 339938.0, profits: 36130.0 },
            { rank: 2, company: 'Wal-Mart Stores', revenues: 315654.0, profits: 11231.0 },
            { rank: 3, company: 'Royal Dutch Shell', revenues: 306731.0, profits: 25311.0 },
            { rank: 4, company: 'BP', revenues: 267600.0, profits: 22341.0 },
            { rank: 5, company: 'General Motors', revenues: 192604.0, profits: -10567.0 },
            { rank: 6, company: 'Chevron', revenues: 189481.0, profits: 14099.0 },
            { rank: 7, company: 'DaimlerChrysler', revenues: 186106.3, profits: 3536.3 },
            { rank: 8, company: 'Toyota Motor', revenues: 185805.0, profits: 12119.6 },
            { rank: 9, company: 'Ford Motor', revenues: 177210.0, profits: 2024.0 },
            { rank: 10, company: 'ConocoPhillips', revenues: 166683.0, profits: 13529.0 },
            { rank: 11, company: 'General Electric', revenues: 157153.0, profits: 16353.0 },
            { rank: 12, company: 'Total', revenues: 152360.7, profits: 15250.0 },
            { rank: 13, company: 'ING Group', revenues: 138235.3, profits: 8958.9 },
            { rank: 14, company: 'Citigroup', revenues: 131045.0, profits: 24589.0 },
            { rank: 15, company: 'AXA', revenues: 129839.2, profits: 5186.5 },
            { rank: 16, company: 'Allianz', revenues: 121406.0, profits: 5442.4 },
            { rank: 17, company: 'Volkswagen', revenues: 118376.6, profits: 1391.7 },
            { rank: 18, company: 'Fortis', revenues: 112351.4, profits: 4896.3 },
            { rank: 19, company: 'Crédit Agricole', revenues: 110764.6, profits: 7434.3 },
            { rank: 20, company: 'American Intl. Group', revenues: 108905.0, profits: 10477.0 }
        ];

2
ParamQuery Pro Evaluation Support / Re: Paginate Event
« on: September 15, 2016, 06:35:03 am »
Code: [Select]

    $(function () {
        var data = [
            { rank: 1, company: 'Exxon Mobil', revenues: 339938.0, profits: 36130.0 },
            { rank: 2, company: 'Wal-Mart Stores', revenues: 315654.0, profits: 11231.0 },
            { rank: 3, company: 'Royal Dutch Shell', revenues: 306731.0, profits: 25311.0 },
            { rank: 4, company: 'BP', revenues: 267600.0, profits: 22341.0 },
            { rank: 5, company: 'General Motors', revenues: 192604.0, profits: -10567.0 },
            { rank: 6, company: 'Chevron', revenues: 189481.0, profits: 14099.0 },
            { rank: 7, company: 'DaimlerChrysler', revenues: 186106.3, profits: 3536.3 },
            { rank: 8, company: 'Toyota Motor', revenues: 185805.0, profits: 12119.6 },
            { rank: 9, company: 'Ford Motor', revenues: 177210.0, profits: 2024.0 },
            { rank: 10, company: 'ConocoPhillips', revenues: 166683.0, profits: 13529.0 },
            { rank: 11, company: 'General Electric', revenues: 157153.0, profits: 16353.0 },
            { rank: 12, company: 'Total', revenues: 152360.7, profits: 15250.0 },
            { rank: 13, company: 'ING Group', revenues: 138235.3, profits: 8958.9 },
            { rank: 14, company: 'Citigroup', revenues: 131045.0, profits: 24589.0 },
            { rank: 15, company: 'AXA', revenues: 129839.2, profits: 5186.5 },
            { rank: 16, company: 'Allianz', revenues: 121406.0, profits: 5442.4 },
            { rank: 17, company: 'Volkswagen', revenues: 118376.6, profits: 1391.7 },
            { rank: 18, company: 'Fortis', revenues: 112351.4, profits: 4896.3 },
            { rank: 19, company: 'Crédit Agricole', revenues: 110764.6, profits: 7434.3 },
            { rank: 20, company: 'American Intl. Group', revenues: 108905.0, profits: 10477.0 }
        ];

        var obj = {
            width: "80%",
            height: 400,
pageModel: { type: "local" },
            resizable: true,
            title: "Grid From JSON",
            scrollModel: { autoFit: true },
            dataModel: { curPage: 1, totalRecords: 100, data: data }
        };
        $("#grid_json").pqGrid(obj);
    });   
   

Why totalrecord property does not work ?

I would like to set the totalRecords more than the variable data has

3
ParamQuery Pro Evaluation Support / Paginate Event
« on: September 14, 2016, 07:12:03 am »
Each click of the page to bring the data, how would I do that? As I seto the total records in the gridview .

4
ParamQuery Pro Evaluation Support / Add row with focus dont work
« on: May 28, 2016, 07:09:40 am »
Code: [Select]
        var data = [
        { itv_seq: 1, pro_cod: 1723, pro_descr: 'Exxon Mobil', itv_status: 1, itv_preco: 339938.5, itv_quant: 12, itv_peso: 2, itv_total: 36130.07, itv_descr: '' }
        ];

        var calcula_preco_total = function (ui) {
            var rd = ui.rowData;
            return rd.itv_preco * rd.itv_quant;
        }

        var obj = {
            width: "100%",
            flexHeight: true,
            pageModel: { type: "local", rPP: 20, strRpp: "{0}", strDisplay: "{0} to {1} of {2}" },
            freezeCols: 2,
            showTitle: true,
            title: "",
            collapsible: false,
            numberCell: false,
            editModel: { onTab: 'nextEdit' },
            cellSave: function (evt, ui) {
                this.refreshRow(ui);
            },
            toolbar: {
                items: [
                    {
                        type: 'button', icon: 'ui-icon-plus', label: 'Adicionar', listeners: [
                          {
                              "click": function (evt, ui) {
                                  var rowData = { itv_seq: 2 };
                                  var rowIndx = grid.addRow({ rowData: rowData, checkEditable: false });
                                  grid.goToPage({ rowIndx: rowIndx });
                                  grid.editFirstCellInRow({ rowIndx: rowIndx });                                 
                              }
                          }
                        ]
                    }
                ]
            },
            colModel: [
                { title: "Sequencia", dataType: "integer", width: 100, dataIndx: "itv_seq", editable: false, align: "center" },
                { title: "Cód Produto", dataType: "string", width: 250, dataIndx: "pro_cod", align: "center" },
                { title: "Descr Produto", dataType: "string", width: 250, dataIndx: "pro_descr", align: "center" },
                { title: "Status", dataType: "integer", width: 200, dataIndx: "itv_status", align: "center" },
                { title: "Preço Unitário", dataType: "float", format: "##.###,00", width: 150, dataIndx: "itv_preco", align: "center" },
                { title: "Quantidade", dataType: "float", format: "##,000", width: 150, dataIndx: "itv_quant", align: "center" },
                { title: "Peso", dataType: "float", format: "##,00000", width: 150, dataIndx: "itv_peso", align: "center" },
                { title: "Preço Total", dataType: "float", format: "R$ ##.###,00", width: 150, dataIndx: "itv_total", editable: false, formula: calcula_preco_total, align: "center" },
                { title: "Descrição Complementar", dataType: "string", width: 300, dataIndx: "itv_descr", align: "center" }
            ],
            dataModel: { data: data }
        };
        var grid = pq.grid("#grid_produto", obj);

Why when you add a new line to focus in the first editable column loses focus

5
ParamQuery Pro Evaluation Support / Mask
« on: May 26, 2016, 08:41:39 pm »

Is there any property of colModel that masks the field in keyup

6
ParamQuery Pro Evaluation Support / Problems with filter date
« on: May 26, 2016, 08:15:09 pm »
Code: [Select]
        var data = [
                { itv_seq: 1, pro_cod: 1723, pro_descr: '2016/05/25', itv_status: 1, itv_preco: 339938.5, itv_quant: 12, itv_peso: 2, itv_total: 36130.07, itv_descr: '' }
        ];

        var consulta_data_emissao = function (ui) {
            var $this = $(this);
            $this.datepicker({
                format: 'dd/mm/yyyy',
                ///language: 'pt-BR',
                onClose: function (evt, ui) {
                    $(this).focus();
                }
            });
            //default From date
            var $from = $this.filter(".pq-from").datepicker("option", "defaultDate", new Date());
            //default To date
            var $to = $this.filter(".pq-to").datepicker("option", "defaultDate", new Date());

        }

        var obj = {
            width: "100%",
            flexHeight: true,
            pageModel: { type: "local", rPP: 20, strRpp: "{0}", strDisplay: "{0} to {1} of {2}" },
            filterModel: { on: true, mode: "AND", header: true },
            freezeCols: 2,
            editable: false,
            showTitle: false,
            collapsible: false,
            numberCell: false,
            colModel: [
                { title: "Filial", dataType: "integer", filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] }, width: 100, dataIndx: "itv_seq", align: "center" },
                { title: "NR Pedido", dataType: "string", filter: { type: 'textbox', condition: "between", listeners: ['keyup'] }, width: 250, dataIndx: "pro_cod", align: "center" },
                {
                    title: "Emissão", dataType: "date",
                    render: function (ui) {
                        return $.datepicker.formatDate('dd/mm/yy', new Date(ui.cellData));
                    },
                    filter: {
                        type: 'textbox',
                        condition: "between",
                        init: consulta_data_emissao,
                        render:function( ui ){
                            return $.datepicker.formatDate('dd/mm/yy', new Date(ui.cellData));
                        },
                        listeners: [{ 'change': function (evt, ui) {

                            ui.value = $.datepicker.formatDate('dd/mm/yyyy', new Date(ui.value));
                            ui.value2 = $.datepicker.formatDate('dd/mm/yyyy', new Date(ui.value2));

                            $(this).closest(".pq-grid").pqGrid('filter', {
                                oper: "add",
                                data: [ui]
                            })
                        }
                        }]
                    },
                    width: 250, dataIndx: "pro_descr", align: "center"
                },
                { title: "Cód Cliente", dataType: "integer", width: 200, dataIndx: "itv_status", editModel: { keyUpDown: true }, align: "center" },
                { title: "Nome Cliente", dataType: "float", format: "R$ ##.###,00", width: 150, dataIndx: "itv_preco", align: "center" },
                { title: "Total", dataType: "float", format: "##,000", width: 150, dataIndx: "itv_quant", align: "center" },
                { title: "Status Faturamento", dataType: "float", format: "##,00000", width: 150, dataIndx: "itv_peso", align: "center" },
                { title: "Status da Aprovação", dataType: "float", format: "R$ ##.###,00", width: 150, dataIndx: "itv_total", align: "center" },
                { title: "Usuario Aprovação", dataType: "string", width: 300, dataIndx: "itv_descr", align: "center" },
                { title: "Data Aprovação", dataType: "string", width: 300, dataIndx: "itv_descr", align: "center" },
                { title: "Cód. Vendedor", dataType: "string", width: 300, dataIndx: "itv_descr", align: "center" },
                { title: "Nome Vendedor", dataType: "string", width: 300, dataIndx: "itv_descr", align: "center" }
            ],
            dataModel: { data: data }
        };

        $("#grid_consulta").pqGrid(obj);

There are filtering

7
Hello,
You have a editable grid for example by pressing the keyboard tab goes to the next field with the open edition?

8

See the Total column has not been updated .
How do I update it when losing the focus of the Exports column

9
I have a question , how do I trigger a LostFocus event in the particular field editing and calculating the sum of two fields of the column.

Pages: [1]