currentData Export?

Hello,

i use the OnToolbarClick event to get the current page or get the slected rows.
I need the currentData of all Pages!?
this.model.currentData is not working ?

        function OnToolbarClick(args)
        {

            if (args.itemName.indexOf("Export") > -1)
            {            
                this.model["currentData"] = JSON.stringify(this.model.selectedRecords.length == 0 ? this.model.currentViewData : this.model.selectedRecords); /
                
            }
         }
   
    </script>

3 Replies

SE Sathyanarayanamoorthy Eswararao Syncfusion Team July 30, 2018 12:33 PM UTC

Hi Kamp, 

Thanks for contacting Syncfusion support. 

Before proceeding with your query please share the following details. So, that we can analyze the query and provide the solution as soon as possible. 

  1. Do you want to send the records from all the pages while exporting to the server side? If yes then it can be obtained using this.model.datasource for local data.
  2. this.model.currentViewData returns only the current page records.
  3. If you are using remote data, then records from all pages cannot be obtained in client side.
  4. So, please share the purpose of sending the records from all pages to the server side while exporting so that we can provide appropriate solution as per your requirement.
  5. Share the Grid code example and essential studio versions.


Regards, 
Sathyanarayanamoorthy 




MK mk August 1, 2018 08:54 AM UTC

"3.If you are using remote data, then records from all pages cannot be obtained in client side."


Thats the point. Thank you for help, found another solution. 


PK Prasanna Kumar Viswanathan Syncfusion Team August 1, 2018 01:15 PM UTC

Hi Kamp, 
 
We are happy to hear that your issue has been resolved.  
 
Please get back to us if you need any further assistance. 
 
Regards, 
Prasanna Kumar N.S.V 


Loader.
Up arrow icon