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

Pages: [1]
1
Help for ParamQuery Pro / Re: problem to get rows added
« on: January 12, 2016, 07:10:44 pm »
THANKS !!!! IT WORKS !!!

I LOVE YOU SO MUCH !!

2
Help for ParamQuery Pro / Re: problem to get rows added
« on: January 12, 2016, 02:09:22 pm »
function saveChanges() {
      
      console.log('---');

      console.log($grid.pqGrid( 'getChanges', { format: "byVal" })); //return Object { updateList: Array[0], addList: Array[0], deleteList: Array[0], oldList: Array[0] } instead of an Object with the datas of my grid (here are 0 anywhere in " changes ").

      console.log('true ? ' + $grid.pqGrid( 'isDirty' )); //return false instead of true

      console.log('true ? ' + $grid.pqGrid( 'isValidChange', { focusInvalid: true }).valid); //return true ==> it works

      console.log('false ? ' + ($grid.pqGrid( 'saveEditCell' ) === false)); //return false ==> it works

      console.log('---');   
    }

3
Help for ParamQuery Pro / Re: problem to get rows added
« on: January 11, 2016, 10:59:38 pm »
Re-hello,

I'm sorry to return to you but I'm on the end with the function " saveChanges " but I block on the " $grid manipulation " in data submission. Here are " console.log " :

console.log($grid) ==> Object { 0: <div#montableauecriture.pq-grid.panel.panel-default.pq-disable-select>, length: 1, context: HTMLDocument → ecriture, selector: "#montableauecriture" }

console.log($grid.pqGrid( 'saveEditCell' )) ==> undefined

console.log($grid.pqGrid( 'isDirty' )) ==> false

Can you help me to have " $grid.pqGrid( 'getChanges', { format: "byVal" }); " with datas please ?

Thanks.

Arnaud.

4
Help for ParamQuery Pro / Re: problem to get rows added
« on: January 11, 2016, 08:04:34 pm »
Hello " paramquery ",

Thanks for your answers that help me strongly. I think that it will be more simple that you translate this " javascript code " in " jquery code " please. (My " jquery object " is grid : I prefer the variable name " grid " to " $grid " ).

I wish you a good day and an excellent week.


function saveChanges() {
   
      console.log(grid);
   
      //attempt to save editing cell.
      if (grid.saveEditCell() === false) {
         return false;
      }
     
      if ( grid.isDirty() && grid.isValidChange({ focusInvalid: true }).valid ) {

         var changes = grid.getChanges({ format: "byVal" });
         
         console.log(changes);
         
         
      }
    }


Arnaud.

5
Help for ParamQuery Pro / Re: problem to get rows added
« on: January 08, 2016, 02:40:05 pm »
Thanks for your answer.

In fact, I want use jQuery Object because my code is implemented in jQuery.

Is it possible to have the function " saveChanges() " of http://paramquery.com/pro/demos/editing_batch in " jQuery " code please ?

I wish you a good day and I thank you for your attention :).

Thank a lot of.

6
Help for ParamQuery Pro / Re: problem to get rows added
« on: January 07, 2016, 10:22:54 pm »
I have TypeError: grid.saveEditCell is not a function

function saveChanges() {
   
      console.log(grid);
   
      //attempt to save editing cell.
      if (grid.saveEditCell() === false) {
         return false;
      }
      
      if ( grid.isDirty() && grid.isValidChange({ focusInvalid: true }).valid ) {

         var changes = grid.getChanges({ format: "byVal" });
         
         console.log(changes);
         
         
      }
    }



------

var grid = $("#montableauecriture").pqGrid(obj);

7
Help for ParamQuery Pro / problem to get rows added
« on: January 05, 2016, 09:23:54 pm »
Hi guys,

I'm French boy then sorry for my english language level.

What I ask is simple :p. Once I have added all my lines via the grid, I want get all rows added but i don't found this :(.

Please, somebody can help me to act ?

Thank you :)


This is my code :
toolbar: {
         items: [
            //...
            { type: 'button', icon: 'ui-icon-disk', label: 'Add all rows', cls: 'changes', listener:
               { "click": function (evt, ui) {
                  console.log(this); console.log(evt); console.log(ui);
                  saveChanges(this, evt, ui);
               }
               },
               options: { disabled: false }
            }
         //...
}

Pages: [1]