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

Pages: [1] 2 3 ... 10
1
News / Re: Roadmap of ParamQuery
« on: October 10, 2024, 02:12:34 pm »
Hello, is there a roadmap for Paramquery Grid for 2024 and 2025?

2
News / Re: Roadmap of ParamQuery
« on: May 22, 2024, 06:23:42 pm »
I have been using ParamQuery for a long time and present the features on this page to the user as a pop-up modal on all my grid screens.

I save the user's column sorting, widths, grid properties, and pagination changes to localStorage.

At startup, I load it from localStorage with the following code. I think it can be presented as a "settings button" as a standard, similar to a "collapsible button".

I am currently working on enabling the ability to save and select multiple localStorage records.

Just a suggestion.

create code
Code: [Select]
var filterModel = state.filterModel || {};
this.option('filterModel.header', filterModel.header);
this.option('filterModel.on', filterModel.on);
this.option('filterModel.menuIcon', filterModel.menuIcon);
this.option('filterModel.gridOptions', filterModel.gridOptions);
this.option('filterModel.timeout', filterModel.timeout);
this.option('filterModel.type', filterModel.type);

var pageModel = state.pageModel || {};
this.option('pageModel.rPP', pageModel.rPP);
this.option('menuIcon', state.menuIcon);
this.option('columnBorders', state.columnBorders);
this.option('rowBorders', state.rowBorders);
this.option('numberCell', state.numberCell);

this.loadState({state:state,refresh: true });




3
Suggest new features / select2
« on: May 22, 2024, 06:05:03 pm »
Is there a roadmap for https://select2.org/ integration for other versions?

4
Help for ParamQuery Pro / Re: enter to save and move to the next row
« on: November 21, 2023, 10:29:29 pm »
Thanks param.

5
Help for ParamQuery Pro / select2 integration
« on: November 21, 2023, 09:55:22 pm »
Hello,

I am using the Select2 library (select2.org) for its features such as searching, tagging, remote data sets, and infinite scrolling. Particularly, when using "remote data," the "infinite scrolling" feature and the ability to mark values in the option and see "labels" in the view make data entry easier.

Currently, I am using Select2 with the following HTML and script codes:

Html Code:
Code: [Select]
<select name='acCode' id='acCode' class='form-select select2ara ' multiple data-tag='true' data-po='accuntList' data-selected='a,b,c'></select>

<select name="hid" id="hid" class="form-select select2">
    <option value=""></option>
    <option value="31">Ahmet</option>
    <option value="30">Ă–mer</option>
</select>




Script Code:
Code: [Select]
// select2 remote data
function initSelect2Ara(element) {
    let selectedValue = String(element.data('selected') || '');
    let selectedValues = selectedValue ? selectedValue.split(',') : [];
    let po = element.data('po');
    let rtip = element.data('rtip');

    element.select2({
        theme: "bootstrap-5",
        cache: true,
        data: selectedValues.map(function (value) {
            return { id: value.trim(), text: value.trim(), selected: true };
        }),
        minimumInputLength: 1,
        ajax: {
            url: "/search.asp?p=s2",
            dataType: 'json',
            delay: 25,
            data: function (params) {
                return {
                    po: po,
                    rtip: rtip,
                    q: params.term,
                    page: params.page
                };
            },
            processResults: function (data, params) {
                params.page = params.page || 1;

                return {
                    results: data.items,
                    pagination: {
                        more: (params.page * 50) < data.total_count
                    }
                };
            }
        }
    });
}

// select2 local data
function initSelect2Multi(element) {
    let selectedValue = String(element.data('selected') || '');
    let selectedValues = selectedValue ? selectedValue.split(',') : [];

    element.select2({
        theme: "bootstrap-5",
        cache: true,
        data: selectedValues.map(function (value) {
            return { id: value.trim(), text: value.trim(), selected: true };
        }),
        allowClear: true
    });
}

$(document).ready(function () {
    $(".select2").each(function () {
        initSelect2Multi($(this));
    });

    $(".select2ara").each(function () {
        initSelect2Ara($(this));
    });
});


Now, I need your help on how to integrate this Select2 integration into ParamQuery Grid 9. Do you have any suggestions on how to use the colModel and editor options for this integration?

I've looked into the ParamQuery Grid 9 API documentation https://paramquery.com/pro/api#option-column-editor, but I'm struggling to understand exactly how to get started. Thanks in advance for your assistance!

6
Help for ParamQuery Pro / Re: enter to save and move to the next row
« on: October 26, 2023, 08:02:22 pm »
When I do 'onSave:nextEdit' the keyboard automatically opens on the next line.

Exactly what I wanted but to the right

I think you need something like downEdit on mobile or clicksToEdit:0 (to switch to automatic edit mode)

7
Help for ParamQuery Pro / Re: enter to save and move to the next row
« on: October 26, 2023, 07:09:14 pm »
Can it be in "edit mode" automatically?

Pressing enter moves you to the next line, but you have to tap once to write on that line. clickEdits: is set to 1.

I'm trying it on tablet.

8
Help for ParamQuery Pro / Re: enter to save and move to the next row
« on: October 26, 2023, 07:00:09 pm »
Worked. thanks a lot

9
Help for ParamQuery Pro / enter to save and move to the next row
« on: October 26, 2023, 05:11:12 pm »
Hello,

Can I make it go to the next line when the user presses enter after typing data into a cell?
or by pressing the tab key.



10
Help for ParamQuery Pro / Re: select list
« on: September 12, 2023, 10:13:05 am »
Thanks. There was a problem when opening a mismatched element or a new line (when an empty line was opened), it gave a "reading" error. It works very well this way.

Code: [Select]
text: itemlist.find( item => item.value==ui.cellData)?.label || ''

11
Help for ParamQuery Pro / select list
« on: August 29, 2023, 04:14:30 pm »
Hello,

I have a selectable column with Select.

In this column, I choose from the itemlist field with value and label values.

The editing user doesn't need to see the id at all. But I am sending the id value to data and saving it.

I have an explanation called id_label, here I print the id_label field with "render text" for the user to understand.

No problem with recording and display.

But after the current data comes, in the 1st line, for example, I choose "needle" instead of "mask", but the "mask" still appears on the screen.

In fact, identity is changing. With console.log(ui.cellData) I see that the data has changed but after changing the selection the label on the screen is wrong.


https://jsfiddle.net/omerx/pye705ua/1/

12
Bug Report / type datetime render
« on: July 21, 2023, 08:36:02 pm »
Hello,

Some data comes from sql, json, xml in "2023-05-22T00:00:00" format. I have set colmodel datatype=date. I am doing Format:dd/mm/yyyy.

(+) The format changes in the grid.
(+) The format changes in the Print.
(+) The format changes in the html.
(+) It changes in csv,  (-) but when exporting to excel, the data in the xlsx file is not the same. It comes as "2023-05-22T00:00:00".

13
Help for ParamQuery Pro / Re: colmodel render (export excel)
« on: July 21, 2023, 07:58:11 pm »
https://stackblitz.com/edit/paramquery-demo-fcync6?file=index.js


Solved:

Added "render: true" to exportData .

Added if to fix "Uncaught invalid color: undefined" error.
Code: [Select]
         render: function (ui) {
           if (ui.rowData['bc']) {
             return { style: 'background-color:' + ui.rowData['bc'] + ';' };
           }
         },

Color codes were in capital letters: like #FF00FF. lowercase letters. Fixed as #ff00ff now excel background colors are showing.

14
Help for ParamQuery Pro / Re: colmodel render (export excel)
« on: July 21, 2023, 05:20:30 pm »
I updated it this way, but the background color does not appear in excel.

It appears on the screen as a style.
Do I need to update the export method?

I'm using version 6, do I need to update to version 9?

Code: [Select]
,{title:'Tarih',dataIndx:'Tarih',dataType:'date',minWidth:24,width:85,cls:'',clsHead:'',align:'',halign:'center',hidden:false,editable:false
,editor:{attr:'type="date" autofocus'},format:'dd/mm/yy',formatRaw:'yy-mm-dd',formatSel:'yy-mm-dd'
,filter:{crules: [{ condition:'between'}],menuIcon:false}
,render:function (ui) {return {attr:'title="'+ui.cellData+'"', style :"background-color:"+ui.rowData['ColorCode']+";" } }
}



headItems function:
Code: [Select]
                {
                    name: 'Save AS',
                    icon: 'ui-icon ui-icon-extlink',
                    subItems: [{
                            name: 'Print',
action: function () {
console.log(this);
var exportHtml = this.exportData({ title: 'Print', format: 'htm', render: true }),
newWin = window.open('', '', 'width=1200, height=700'),
doc = newWin.document.open();
doc.write(exportHtml);
doc.close();
newWin.print();
}
},
                        {
                            name: 'Excel',
                            action: function(){
                                exportData.call(this, 'xlsx');                                   
                            }
                        },
                        {
                            name: 'Csv',
                            action: function(){
                                exportData.call(this, 'csv');                                   
                            }
                        },
                        {
                            name: 'Html',
                            action: function(){
                                exportData.call(this, 'html');
                            }
                        },
                        {
                            name: 'Json',
                            action: function(){
                                exportData.call(this, 'json');
                            }
                        }
                    ]                       
                },


exportData function:
Code: [Select]
        function exportData(format){
            var blob = this.exportData({
                format: format
            })
            if(typeof blob === "string"){                           
                blob = new Blob([blob]);
            }
            saveAs(blob, "Portal."+ format );
        }

15
Help for ParamQuery Pro / colmodel render (export excel)
« on: July 21, 2023, 03:23:27 pm »
Hello,

I am painting the cell according to the value from the database.

In this, I use cls in render in colmodel as follows.

There is no problem in painting, but the colors I put in excel are not coming.

reqDateClass returns class like red. I have a css like .red {background-color:red;} in the page. I can return data in a different way.

What kind of coding should I do in colmodel and data to export to Excel?

Code: [Select]
,{title:'Reg.Date',dataIndx:'reqDate',dataType:'date',minWidth:24,width:85,cls:'',clsHead:'',align:'',halign:'center',hidden:false,editable:false
,editor:{attr:'type="date" autofocus'},format:'dd/mm/yy',formatRaw:'yy-mm-dd',formatSel:'yy-mm-dd'
,filter:{crules: [{ condition:'between'}],menuIcon:false}
,render:function (ui) {return {attr:'title="'+ui.cellData+'"',cls:ui.rowData['reqDateClass']} }
}

Thanks.

Pages: [1] 2 3 ... 10