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

Pages: [1]
1
Help for ParamQuery Pro / I Can't batch editing when groping rows
« on: October 25, 2018, 06:47:54 pm »
Hi, I followed the batch editing demo and it works great when no grouping is involved.
When grouping everything looks fine but can't save changes.
I guess the error is on this line
Code: [Select]
data: {
        //JSON.stringify not required for PHP
        list: JSON.stringify( gridChanges )
},
When trying to save changes I receive the following errors:
Code: [Select]
Uncaught TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at saveChanges
other errors are shown if I remove JSON.stringify
Code: [Select]
data: {
        list: gridChanges
},
errors:
Code: [Select]
Uncaught RangeError: Maximum call stack size exceeded
    at Number.toString (<anonymous>)
    at Function.isPlainObject (jquery.min.js:2)
    at Function.r.extend.r.fn.extend (jquery.min.js:2)

What is the way to save/batch editing when grouping is involved??

3
Hi, I'm using the render function to make some customization on a column.
I'm also using the grouping feature to keep data more clear.
When the data is grouped it seems that the column with render function displays their "summary" option, which I don't declare in the colModel, and an undefined word is showed at the top of the table
How can I remove this "undeifned" word, or stop colModel with render function from being summarized?


Removing the grouping

Code: [Select]
colModel: [
                { title: "ID", "dataType": "integer", "dataIndx": "id",
                    editable: false, maxWidth: 50, align: 'center', denyGroup: true, },
                { title: "Nombre", dataType: "string", dataIndx: "name",
                    editable: false, width: 150 },
                { title: "Material", dataType: "string", dataIndx: "material",
                    editable: false, },
                { title: "Color", dataType: "string", editable: false, dataIndx: "color",
                  render: function (ui) {
                      var html = "";
                      if (ui.rowData.color_value) {
                          html += '<div class="color-sq" style="background-color:'+ ui.rowData.color_value +'"></div>';
                      }
                      html += "<span>"+ ui.rowData.color +"</span>";
                      return {
                          text: html
                        }
                  }
                },
                { title: "Tamaño", dataType: "string", dataIndx: "size",
                    editable: false, },
                { title: "Stock", dataType: "integer", dataIndx: "quantity",
                    maxWidth: 80, align: 'center', denyGroup: true,
                    summary: { type: "sum" },
                  render: function (ui) {

                      return {
                          style: 'background-color: rgb(76, 175, 80);color: white;border:1px dotted #333333;border-top:0;'
                      }
                  }
                },
            ],
Code: [Select]
groupModel: {
                on: true,
                dataIndx: ['name'],
                collapsed: [true],
                fixCols: false,
                summaryInTitleRow: 'all',
                titleInFirstCol: false,
                headerMenu: false,
            }

4
Hi, I use laravel mix which uses Webpack to optimize js files in common js modules. When I compile js assets it gives me an error on pqgrid.dev.js
Code: [Select]
Syntax Error: ‘with’ in strict modeI read this is beacause js with() statement is not allowed in es6
How can I replace this fragment of code which uses with() statement to be es6 strict mode compatible?
Code: [Select]
with(obj.getRange = function() {
   return {
      r1: r,
      c1: c
   }
}, obj)

Pages: [1]