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 - erlind.dhami

Pages: [1]
1
I need get the path of file when i select a file excel (for example) from item type input into toolbar.
how can I do ? Can you help me? I use Version 8 Pro

This is code for item into toolbar:
Code: [Select]
        var elemtItem = {
            type: 'file',
            attrFile: "id='import_file' accept='.xls,.xlsx,.csv' title='Import Data from Csv or Xlsx'",
            icon: 'ui-icon-folder-open',
            style: 'margin-right:0;margin-left:1px;',
            listener: function (evt) {
                //import xlsx or csv file via HTML5 file input control.
                var grid = this,
                file = evt.target.files[0];//doesn't work in IE9.
                //var pippo = `${file.webkitRelativePath}`;
                //pippo = Server.MapPath("~");
                //console.log(pippo);
                if (file) {
                    console.log(file);
var tmppath = URL.createObjectURL(event.target.files[0]);
console.log(tmppath);
var filePath=$('#import_file').val();
console.log(filePath);
var path = (window.URL || window.webkitURL).createObjectURL(file);
console.log('path', path);
                    grid.showLoading();
                    //import first sheet of xlsx into workbook.
                    pq.excel.importXl({ file: file }, function (wb) {
                        //grid = grid.Tab().main();//always import in main tab.
                        //import workbook into grid.
                        console.log(wb);
                        //grid.importWb({ workbook: wb, extraRows: 0, extraCols: 0 });
                        grid.hideLoading();
                    })
                }
            }
        };

This is response:
Code: [Select]
File {name: 'CheckFornituraOpzioniRESNORES_more365gg_al20231129.xlsx', lastModified: 1701246539432, lastModifiedDate: Wed Nov 29 2023 09:28:59 GMT+0100 (Ora standard dell’Europa centrale), webkitRelativePath: '', size: 10380, …}lastModified: 1701246539432lastModifiedDate: Wed Nov 29 2023 09:28:59 GMT+0100 (Ora standard dell’Europa centrale) {}name: "CheckFornituraOpzioniRESNORES_more365gg_al20231129.xlsx"size: 10380type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"webkitRelativePath: ""[[Prototype]]: File
frmTestGrigliaShunt_retevera.html:124 blob:null/78241890-abd0-4664-8ca5-663ea8270ebe
frmTestGrigliaShunt_retevera.html:126 C:\fakepath\CheckFornituraOpzioniRESNORES_more365gg_al20231129.xlsx
frmTestGrigliaShunt_retevera.html:128 path blob:null/32652fb3-6c0f-45fc-821b-e2bdada8321a
frmTestGrigliaShunt_retevera.html:134 {sheets: Array(1), activeId: null}







2
Help for ParamQuery Pro / Re: Issues adding multiple rows
« on: July 16, 2021, 02:49:20 pm »
hello there paramvir,

thanks for the quick reply.

I tried to add the rows to the 2nd grid but I am seeing an error: https://jsfiddle.net/b3dcyte8/1/
then I tried another approach and it works: https://jsfiddle.net/dzoerp73/5/

I would like to add the rows on both grids calling a single function. Can you please help me achieve it?

Thanks in advance

3
Help for ParamQuery Pro / Issues adding multiple rows
« on: July 15, 2021, 06:02:10 pm »
Hi there,

I am trying to add multiple rows to a given grid following an event but I am seeing an error in the console log.
Here is an example of what I am trying to do https://jsfiddle.net/janfriElicat/bm2dyoLz/7/

I am seeing different errors rather I run it on jsfiddle or locally.

Attached to this post please find the error I see locally.
On jsfiddle I see a generic “script error”


I have tried it with version 8.0.1 and I get the same error.
Clearly I am doing something wrong.

Can you please help?

Thanks in advance

Pages: [1]