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

Pages: [1] 2
1
Help for ParamQuery Pro / column editorr textarea
« on: June 02, 2022, 04:11:14 pm »
Hi param Team !

I have a creepy question, I build a grid for translation purpose, theres 2 column, and as many row as fields to be translate. The first Row belongs to the orginal text, the second is editable and dedicated to fill with the translation in other language regarding the text on column 1.
The column 2 as of course an editor:
    { type: 'textarea'}.
The traditional result g้nerated is <textarea name="dataIndx"></textarea>
As the Grid is envelopped in a traditional form, the purpose of the question would be to render the textarea with a custom name="custom_name_relaying_on_text_to_translate".

Any idea how I could achieve this goal, I have been trying to rebuild the textarea with render option, without success.

Thanks for a piece of help if possible

2
I solve my probleme !
I learn a lot  8)

3
Also, I am not sur to understand what the var totalRecords nelongs too ?
Is theres a way to get a kind of sheme on php request side, applying a limit in mysql request limit($pq_rpp, $pq_rpp * $pq_curpage ) increase the response time, but completely paralysed filter.

The goal would be to divide the dataModel request in two, a first one who would initially charge the 100 first records, for a super fast result, and a nother one who would get all opther request silently in the background who would feed the dataModel with all other records.

I am not sure to be super clear.

4
Help for ParamQuery Pro / Sequential ajaxRequest with too many records
« on: March 26, 2022, 01:27:22 am »
Hi !

We have large records in database, so I follow the exemple here : https://paramquery.com/pro/demos/virtual_scroll
Thats works well and It increase the user experience by loading much faster a large amount of data.

I would like to know if there is a way to use pageModel with a type remote at the same time and how to do it ?

5
Help for ParamQuery Pro / refresh method and filter
« on: March 19, 2022, 07:17:26 pm »
Hi Param Team !

I currently have a grid, who offer the ability to choose the diffferent the different header fields ( colModel) the want to display or not. The operation run through an ajax call, who rebuilt the col model affecting hidden or not depending of the quary. Tha ajax call return the new colmodel confoguration.
At this time on success function, I simply apply :
grid.option('colModel', data);
grid.refreshCM();

The probleme I am facing, is that all previous filter applied to the grid are totally reseting.

Any idea regarding an elegant way to refresh the grid by maintaining the selected filter, a little like the "ui-icon ui-icon-refresh" is doing ate the footer of the grid ? Or may I ask something impossible ?

Thanks in advance

6
Help for ParamQuery Pro / Trouble with datepicker
« on: August 14, 2021, 04:18:15 pm »
Hi !

I have column with datatype date, with an editor who init a function dateEditor :
Code: [Select]
function dateEditor(ui) {

var $inp = ui.$cell.find("input"),
    grid = this,
format = ui.column.format || "dd/mm/yy";



            //initialize the editor
    $inp
    .datepicker({
    changeMonth: true,
    changeYear: true,
    dateFormat: format,
        showAnim: '',
        onSelect: function () {
        this.firstOpen = true;
        },
        beforeShow: function (input, inst) {
        setTimeout(function () {
            $('.ui-datepicker').css('z-index', 999999999999);
            });
            return !this.firstOpen;
        },
        onClose: function () {
        this.focus();
        }
   });
}
The datepicker works well but once date is selected, and key press enter, the date gone and i receive a console message : "Cannot read property 'dpDiv'".

Any idea how to fix this ?

7
Hi !
I have two columns, one dataType integer hidden, the second is an more elegant extrapolation of the first one, who allow repositioning of some stuff through drag and drop.

The visible column must be sort regarding the hidden one.

first hidden column dataIndx is 'position',
second column visible html dataType dataindx is 'productPosition'

I am pretty sure that the solution is super simple but I have been trying many different option without any success.

I cannot use render for the visible column, cause some required information are enclosed in "data attribute" in the html build process for ajax purpose on move node process.

Would you be kind to give me clue to achieve something who intellectually seems simple,  but who belongs to me a brain teaser :)

Thanks for your support

8
Help for ParamQuery Pro / Re: AddRow with html content
« on: April 28, 2020, 07:08:37 pm »
I found the solution !
as this relay to html content, ColModel editble was turn to false, so I add checkEditable: false and all is coming properly !

9
Help for ParamQuery Pro / AddRow with html content
« on: April 28, 2020, 06:58:34 pm »
Hi !
I am trying to add new row to a grid grammatically, usually It's pretty easy, but my entire colmodel are dataType html.


So the function is :



var rowIndx =  SpecificPricesGrid1.addRow({
       newRow: {
      from_quantity: '<input type="number" class="specificQuantity" value="0">',
      price_1: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="1" data-qty="0" id="typeSelect_1_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_1_0" data-group="1" value="" ><>',
      price_2: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="2" data-qty="0" id="typeSelect_2_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_2_0" data-group="2" value="" ><>',
      price_3: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="3" data-qty="0" id="typeSelect_3_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_3_0" data-group="3" value="" ><>',
      price_4: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="4" data-qty="0" id="typeSelect_4_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_4_0" data-group="4" value="" ><>',
      price_5: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="5" data-qty="0" id="typeSelect_5_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_5_0" data-group="5" value="" ><>',
      price_6: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="6" data-qty="0" id="typeSelect_6_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_6_0" data-group="6" value="" ><>',
      price_7: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="7" data-qty="0" id="typeSelect_7_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_7_0" data-group="7" value="" ><>',
      price_8: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="8" data-qty="0" id="typeSelect_8_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_8_0" data-group="8" value="" ><>',
      price_9: '<div class="input-flex"><div class="input-group-select"><select name="reduction_type" class="typeSelect" data-id="9" data-qty="0" id="typeSelect_9_0"><option value="amount">€</option><option value="percentage">%</option> </select><><input type="number" data-id="0" class="specificValue" id="specificValue_9_0" data-group="9" value="" ><>',
                     }
});


The new row appears as expected, but content html of each cell is simply empty.


Any idea what's going wrong ??


Thanks in advance


Jeff

10
Help for ParamQuery Pro / Re: Iteration on nested grid
« on: March 09, 2020, 07:06:48 pm »
Thank you !!!

I was simply missing the grid.refresh() !!!

11
Help for ParamQuery Pro / Iteration on nested grid
« on: March 08, 2020, 01:43:45 pm »
Hi !
I have a one level nested grid, and create a save button to operate some ajax request at the top of the grid.
So I need to iterate some value all along the spreadsheet, but I notice that only expand 'row' are read.

So I explore the idea to force opening all 'pq_detail' and apply them the concept of show true, but i probably miss intellectually something in my approach to achieve this,
can you please provide a simple function who would expand all row ?

Thanks in advance !

Jeff

12
Help for ParamQuery Pro / Change value of a cell programmatically
« on: February 23, 2020, 05:39:51 pm »
Hi
I am working on a grid, build with ajax as both regarding colModel and dataModel, through a database.

The object list has a field position. And of course, the idea is to use drag and drop to modify the position integer.
So I have a column, with position field, and i I use drag and drop.
Once move achieved, I used a function

mySelector.on("moveNode", function (event, ui) {..};

to determine new position and eventually push an ajax request to operate the change in the database.

And all is working like a charm, but at this point, I would need to change the value in each cell concerned by the position changement, to illustrate, if I move the row position 1 to row position 5, I want to change row 2 column position value to  1, row 3 column position to 2, till the moved row, who would become the number 5.
So all cell regarding position have specific identifier, I launch a simple jquery each function, who find all what I need, once i calculate the old position integer, new position integer, and simply try to push new value in the cell, nothings happen...
Push million of console.log to try to figure what's happen, no error, all looks perfect, but i can't definitively not put new value in the cell....

So i know that the alternatives would be to push new data in database, once reload data, and refresh the grid, but when the data base is rather huge, that takes a time and it's definitively not aesthetic.
I have been trying to let the column editable, or not, nothings change.
Is there some protection who prevent any incursion in cell value by jQuery ?

Any suggestions ?

Thanks in advance !

Jeff

13
Help for ParamQuery Pro / Drag and Drop on Tree column
« on: August 28, 2019, 01:35:34 pm »
Hi,

still in need of re positioning parent child object through Drag and drop function, I switch from nested grid to tree.
I use flat format who was more logical for me but I try both with same trouble :
https://jsfiddle.net/NearEarthObject/o879bfwg/

One time again, child are moving without any trouble the one to the other.
But when I try reorganizing parent row, I got a console error : Cannot read property 'children' of undefined.

What is amazing, I took inspiration of https://paramquery.com/pro/demos/dnd_tree example.
In this case that works fine.

Any idea how I could solve my issue ?

Thanks in advance

14
Suggest new features / Re: Drag and Drop on Nested Gride
« on: August 27, 2019, 04:48:31 pm »
Sounds great additional value  ;)

For my immediate needs, I turn nested grid into tree.
Drag drops works well except I would like to prevent a moving nodes change of level. and make drag and drop only allowed between same level.

Would you be kind giving me some reflex ions track to achieve It ?

15
Suggest new features / Drag and Drop on Nested Gride
« on: August 26, 2019, 01:28:20 pm »
Hi !

I have a nested grid with only one level, parent and child. I need to allow order position with drag and drop.
Parents are changing without any trouble, but when I try to operate drag on child row, the child row jump to the top of the grid.

https://jsfiddle.net/NearEarthObject/o879bfwg/

I would like to know if it's possible to allow row drag and drop of children staying in children view ?

Thanks in advance

Pages: [1] 2