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

Pages: [1] 2
ParamQuery Pro Evaluation Support / Help with custom editor "input file"
« on: November 29, 2016, 06:54:55 pm »
Im trying to use a custom editor, But I can not get it to work properly. when i click the button "choose a file",the editor disappears, and when i click in accept button, nothing happens.

im recreate it in a jsfiddle

Is this the right way to create a custom editor?

Any idea how to solve this?


ParamQuery Pro Evaluation Support / problem filtering integer column
« on: October 13, 2016, 08:56:15 pm »
I have implemented the filter from the example filter local

I add a column with dataType="integer", and when I try to filter with "all fields"or only integer fields and any condition, I received the exception

pqgrid.min.js:423 Uncaught TypeError: a.indexOf is not a function
contain                                 @ pqgrid.min.js:423
c.isMatchCellSingle               @ pqgrid.min.js:425
c.isMatchRow                       @ pqgrid.min.js:426
c.filterLocalData                    @ pqgrid.min.js:427
d._onDataAvailable               @ pqgrid.min.js:315
d.filter                                   @ pqgrid.min.js:311
(anonymous function)          @ jquery-ui.min.js:6
each                                      @ jquery.min.js:2
each                                      @ jquery.min.js:2
e.fn.(anonymous function)   @ jquery-ui.min.js:6
filterhandler                           @ VM1805:23
(anonymous function)          @ pqgrid.min.js:346
dispatch                                @ jquery.min.js:2
u                                           @ jquery.min.js:2

Any idea what it could be?

I forgot to mention that the options
editModel: {
            keyUpDown : false,
            allowInvalid : true,
            onSave : 'nextEdit',
            onTab : 'nextEdit',
            onBlur : 'validate',

if I add a new row, and complete all fields, how can give focus to the Save button?, currently pressing enter or tab, the editor is maintained in the last cell when this is located in the last row.

in te example
there are 3 grids, if I edit a cell in each grid, how I can save all grids from a unique action.
currently, I'm generating multiples sub-grid dinamically from a global model.

ParamQuery Pro Evaluation Support / Re: addRow when editable = false
« on: September 13, 2016, 06:19:10 pm »
I solve whit this code:

var rowData = {indx1:'data1',index2:'data2'} //assuming indx1 and indx2 editable:false

var rowIndx = grid.addRow({
        newRow:{},                         //add void row
        rowIndx: 0,                          //at first row
var pdata = grid.pdata[0];          //get the grid data at position 0

for(i in rowData){
     pdata = rowData;           //set values of my rowData

grid.refreshRow({rowIndx:0})    //refresh the row

ParamQuery Pro Evaluation Support / Re: addRow when editable = false
« on: September 13, 2016, 05:08:05 pm »
but the new row that I add, did not add any recIndx, only added a fact to another column editable:false, obviously my column recIndx is also editable: false

ParamQuery Pro Evaluation Support / addRow when editable = false
« on: September 13, 2016, 03:07:43 am »
Hi, i have a question,
when I add a new row whit a default value in a column 'editable:false', I add in addRow({checkEditable:false}) and the row is added whitout problem, but when i add a second row, i get this error "Uncaught primary key violation", but if i remove checkEditable:false or replace whit checkEditable:true, then i can add unlimited rows, but the default values of the column 'editable:false' is not added, how i can add multiples row whit a default value when column editable is false?
thanks :)

ParamQuery Pro Evaluation Support / Re: Validation alert
« on: September 09, 2016, 09:31:06 pm »
I resolve with this
{ type:function(ui){
                var value = ui.value;
                if(value.length > 50 ){
                    alert('some message');
                    return false;

but I have other question.
when I put return false, the entered value is cleared, then I comment the line  //return false,the entered value remains in the cell but the alert is displayed 2 times,
how i can remain the entered value and return false?

ParamQuery Pro Evaluation Support / Validation alert
« on: September 08, 2016, 12:10:12 am »
It is possible that instead of the tooltip "required",

an alert "required" is displayed

indeed , with updateRow buttons are activated, but the custom button behaves strange when I add updateRow () , with the first click changes state, but when I want to go back to change state , does not work with a click , I do 2 click and states are reversed

load the firs state:

click to change state:

other click to change state:

other click:

and at this point , save changes button does not work, but only it happens when I put the updateRow method

i have a custom field, it's a bootstrap switch, which he called from a function

var config = {
            dataIndx : "usr_est",
            title    : "Estado",       

function check_stat(config){
    var grid;
    return { title: config['title'], dataIndx: config['dataIndx'] , width:"100px", align: "center", resizable: false, editable:true,
            editor: false,
            editable: function (ui) {
                            return !ui.rowData.disabled;
            render: function (ui) {
                grid = this;
                var cellData = ui.cellData;
                var checked = cellData === 1 ? 'checked' : '';
                return  { text: "<label><input type='checkbox' " + checked + " name='check-stat'/></label>" };
            postRender: function(ui){
                    offText:'Inactivo'}).on('switchChange.bootstrapSwitch', function(event, state) {
                      var rowData = ui.rowData;
                        this.value = 1;
                        rowData[config['dataIndx']] = 1;
                        this.value = 0;
                        rowData[config['dataIndx']] = 0;
                      grid.addClass({ rowData:rowData, rowIndx: ui.rowIndx, cls: 'pq-row-edit pq-cell-dirty ' });

but when I change the state, the save button is not activated

How can I force to take it as a change made by the user? Any idea?

apparently is a problem with the % , putting 20%, 20%, and 60% occurs the problem, but to put 19%, 21% and 60% solved

ParamQuery Pro Evaluation Support / empty column at the end of the grid
« on: August 11, 2016, 10:36:42 pm »
Hi, I'm having a little problem, apparently is adding an empty column , or for some reason it is appearing a space at the end of the grid

My colModel

 var colModel = [ 
                {title:"ID",  width:"0%", dataType:"string",dataIndx: "eti_id",hidden:true,editable:false},
                {title:"Pagina", width:"20%", dataType:"string",dataIndx: "eti_pag_cod",nodrag:true,editable:false}, 
                {title:"Codigo", width:"20%", dataType:"string",dataIndx: "eti_cod",nodrag:true,editable:false}, 
                {title:"Etiqueta", width:"60%", dataType:"string",dataIndx: "eti_val",nodrag:true}             
I tried whit width and minWidth, whit % and px, Any idea what it could be? Thanks.

I'm using the autosave example

and the nested grid example

the nested grid have the same toolbar that the parent grid.

My saveChanges function:
function guardar_cambios(grid) {
    //attempt to save editing cell.
    if (grid.saveEditCell() === false) {
        return false;
    //if ( grid.isDirty() && grid.isValidChange({ focusInvalid: true }).valid ) {
    if (!$.active && !grid.getEditCell().$cell && grid.isDirty() && grid.isValidChange({ allowInvalid: true }).valid) {   
        var cambios = grid.getChanges({ format: "byVal"});
        var pathName = window.location.pathname;
        var recIndx = grid.options.dataModel.recIndx;
        var url = pathName + '/guardar_cambios';
            url = url + grid.options.sufijo;
            dataType: "JSON",
            type: "GET",
            async: true, 
            context: grid,         
            url: url,                           
            data: { listas: JSON.stringify(cambios) },           
            beforeSend: function (jqXHR, settings) {
            success: function (cambios) {
                grid.commit({ type: 'add'});
                grid.commit({ type: 'update'});
                grid.commit({ type: 'delete'});
            complete: function (cambios) {

i tried use a loop like a for, to iterate all the rows in the grid, and can use refreshRow({rowIndx: i }), but not working, also i tried use updateRow, whith the same result.

Pages: [1] 2