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

Pages: 1 [2] 3
16
Help for ParamQuery Pro / Re: contextmenu listener is action
« on: December 18, 2019, 02:49:31 pm »
i did, but your example code from api-doc is the snippet, i used in my post.


17
Help for ParamQuery Pro / contextmenu listener is action
« on: December 17, 2019, 04:09:16 pm »
hi
tried to implement pq-contextmenu following the api docu.
from api:>>  $( selector ).pqGrid( { contextMenu: {on: true, items: [{
            name: 'Undo',
            listener: function(evt, ui, item){
                this.History().undo();
            }
        },        ...    ]} } );
didnt work, then i mistrusted the naming "listener". Changed to "action", then it works.



18
Help for ParamQuery Pro / cellClick event
« on: December 17, 2019, 03:08:29 pm »
hi
i tried to establish a cellClick eventhandler but no success at first.
Played with the Demos, here my results:
   $(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: 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,
            resizable: true,
            title: "Grid From JSON",
            showBottom: false,
            scrollModel: { autoFit: true },
            dataModel: { data: data }
   //,cellClick:function(event,ui){console.log(ui)}  //works
        };
        $("#grid_json").pqGrid(obj);
   $("#grid_json").pqGrid("option",{cellClick:function( event, ui ) {console.log(ui)} }) //works
   //$("#grid_json").on( "pqGrid:cellClick", function( event, ui ) {console.log(ui)} ); //does not work
   
    });   
   

19
Help for ParamQuery Pro / Need hint in pivot
« on: November 30, 2019, 06:49:04 pm »
hello
i try to setup a pivot table. I startet with a copy of you democode and adapted my data structure. Somewhere i have a mistake, but i cannot find it.
I always land in an error <Cannot read property "grouChange" of undefined.>

here you can find my testscript: https://deligno.chpost.ch/testpivot.html


I would like to have very basic pivot example with static Data; this would make it easyer to start from scratch.
Thank you

Great work!!!


20
Help for ParamQuery Pro / fillhandle
« on: August 22, 2019, 08:16:09 pm »
hi
i would like enable fillhandle  just  on certain columns, not globally.
Can you give me an example?

Thank you

21
Help for ParamQuery Pro / Re: i need a hint
« on: July 10, 2019, 10:22:47 pm »
after experimenting several hours this snippet does the trick:
    editorKeyDown:function(e,ui){if(e.currentTarget.value=='' && e.keyCode==13){
                                                    var id=ui.$td[0].id.split('-');
                                                    id[4]=parseInt(id[4])+1;
                                                    $('.pq-editor-focus').val($('#'+id.join('-')).text())}                               
                                                                                    }
tried it with events editorEnd and cellBevoreSave, value got allways cleared.


22
Help for ParamQuery Pro / Re: i need a hint
« on: July 09, 2019, 01:43:23 pm »
i change slightly the goal to achieve.
When the user leaves a empty field with Enter Key, then it should fill in the value from the direct neighbour (down) record.

this snippet performs well, but then it clears the injected value on blur
 editorEnd:function(e,ui){if(ui.\$cell.val()==''){
                                                    var id=ui.\$td[0].id.split('-');
                                                    id[4]=parseInt(id[4])+1;
                                                    ui.$cell.text($('#'+id.join('-')).text());
                                                    this.saveEditCell()}                               
                                                                                    },

how can i save the injected value?

23
Help for ParamQuery Pro / i need a hint
« on: July 05, 2019, 10:54:44 pm »
hi
i want to have a picklist that contains all different entrys in current column. I manged it by this snippet.
autocomplete ... source: function (grid,ui){               
                    var ret = []
                    var data=grid.getData({dataIndx:[ui.dataIndx]})
                    $(data).each(function(i,v){if(v[ui.dataIndx])ret.push(v[ui.dataIndx])})
                    return (ret)}
So far, so good.
Now i am stuck with this:
when i leave the field, i should complete with the first matching value found in the list, without the need to choose by key or mousclick.
Example; i enter  a , the list contains Armada, Bravo, Mountain then it should autocomplete with Armada on leaving the field.
Maybe you can provide me a hint.

24
Help for ParamQuery Pro / Re: nextEdit misplaces input
« on: July 05, 2019, 10:45:04 pm »
i checked for js errors in console, none found. Behaviour was different in Chrome and Firefox. I removed onSave:nextEdit, its ok that way.

25
Help for ParamQuery Pro / nextEdit misplaces input
« on: May 31, 2019, 11:18:00 pm »
hi Paramvir
 i encounter following problem when i activate next Edit like
editModel:{clicksToEdit:2,pressToEdit:true,onSave:'nextEdit',saveKey:$.ui.keyCode.ENTER,keyUpDown:false},           

after modifying a field the next field gets misplaced in the upper left corner of the grid, without changing values the next field remains at the right place.


26
Help for ParamQuery Pro / clicksToEdit:2
« on: May 27, 2019, 08:23:22 pm »
hi Paramvir
i want entering in editmode only be doubleclick. I tried to add clicksToEdit:2 in the https://paramquery.com/pro/demos/editing_custom example.
..
editModel: {
      clicksToEdit:2,
                saveKey: $.ui.keyCode.ENTER,
                //filterKeys: false,
                keyUpDown: false,
                cellBorderWidth: 0
            },
..

It did not change the behaviour. Editor still starts by pressing any key.

27
Help for ParamQuery Pro / Re: date format
« on: May 23, 2019, 10:44:59 pm »
hi omerix
i found a workround.(quick and dirty). Just declare the date-field as string, then it will accept dd/mm/yyyy format.

{title: "Datum", width: 100, dataType: "string", dataIndx: "datum",format:'dd.mm.yy',formatRaw:'dd.mm.yy',....

28
Help for ParamQuery Pro / Re: nextEdit
« on: May 20, 2019, 08:30:34 pm »
if(grid.isEditable({rowIndx:ui.rowIndx,colIndx:ui.colIndx}))grid.editCell(ui)
did the trick
thank you

29
Help for ParamQuery Pro / Re: nextEdit
« on: May 17, 2019, 02:51:15 pm »
hi
i think, triggering a dblclick event could be the most elegant way to achieve my goal. (invoke editor just on admitted rows)
but no look.
my snippet:
if(evt.keyCode == 40 || evt.keyCode == 38){ //down key.               
                    setTimeout(function(){
                        //debugger;
                        evt.keyCode==40 ?ui.rowIndx ++:ui.rowIndx --;
                        evt.keyCode==40 ? ui.rowIndxPage++:ui.rowIndxPage--;
                        ui.$cell.dblclick() //does not work, tried also .trigger('dblclick')
                    },10)                   
                }

30
Help for ParamQuery Pro / Re: nextEdit
« on: May 16, 2019, 11:08:37 pm »
thank you, it works fine. But i have another question, i am stuck on it:
not all records are ediatable in the list, just the ones that belong to me. So i added a class editable to the pq_rowcls and 
var colModel= [
   ...   {title: "Vorname",dataType:"string",dataIndx: "vorname",editable:function (ui){return ui.rowData.pq_rowcls && ui.rowData.pq_rowcls.indexOf("editable")!=-1}},
        {title: "Name",dataType:"string",dataIndx: "name",editable:function (ui){return ui.rowData.pq_rowcls && ui.rowData.pq_rowcls.indexOf("editable")!=-1}},
   ...     
  ]

i altered your snipped so:
        editorKeyDown: function(evt, ui){           
                var grid = this;
                if(evt.keyCode == 40 || evt.keyCode == 38){ //down key.
                   
                    setTimeout(function(){
                        //debugger;
                        evt.keyCode==40 ?ui.rowIndx ++:ui.rowIndx --;
                        evt.keyCode==40 ? ui.rowIndxPage++:ui.rowIndxPage--;
                        if(ui.$cell.parents('.editable'))grid.editCell(ui); <--------------------this does not work, it is not reaching the row 
                    },10)                   
                }
            }

Pages: 1 [2] 3