jsgrid icon indicating copy to clipboard operation
jsgrid copied to clipboard

Export JS Grid data

Open klingamdinne opened this issue 6 years ago • 4 comments

Can anyone help/sample example on how to use exportData feature in jsgrid?

Thanks in advance

klingamdinne avatar Aug 23 '19 21:08 klingamdinne

I get

Cannot read property 'apply' of undefined

and I don't know how to fix that ...

djdance avatar Feb 17 '20 15:02 djdance

ah, there are no such a function...

djdance avatar Oct 16 '21 13:10 djdance

this fork is with export https://github.com/artyomLisovskij/jsgrid

djdance avatar Oct 16 '21 13:10 djdance

but you have to add fixes into _itemToCsv():

if (item)/*this*/ Object.keys(item).forEach(function(key,index) {

and right below

 if (fields.length > 0){
                    
                    //find proper index
                    var field = null//fields[index];
                    $.each(fields,function(keyF,valueF){
                        if (valueF.name==key){
                            field=valueF
                            return false
                        }
                    })
                    if (field){

djdance avatar Oct 16 '21 13:10 djdance