pdfExport does not exist
Hello there,
I try to move javascript code to ts, but I got some errors as below:
the original code without errors
please help
Attachment: sample_code_91577cf1.zip
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
SK
Sujith Kumar Rajkumar
Syncfusion Team
July 31, 2020 08:41 AM UTC
Hi Teddygotts,
Greetings from Syncfusion support.
We checked your reported problem but unfortunately were unable to reproduce it from our end as no errors were shown on accessing the Grid instance while using typescript in the Vue application. Please check below sample for your reference,
On further validation we suspect this might be due to some common configuration problem in your Vue application. So can you please check the below stack overflow and GitHub links where similar problem is discussed to resolve this,
Links: https://stackoverflow.com/questions/45555089/resolve-property-does-not-exist-on-type-vue-error
Let us know if you have any concerns.
Regards,
Sujith R
TE
teddygotts
July 31, 2020 03:16 PM UTC
I use your sample provided, but it showed the same error
SK
Sujith Kumar Rajkumar
Syncfusion Team
August 3, 2020 07:15 AM UTC
Hi Teddygotts,
We checked the provided information and would like to let you know that this is a common problem with the “vue-class-component” on accessing component reference in Vue typescript. Please check the below issue logged in GitHub for more details on this,
So as suggested in this stack overflow link this can be resolved by defining the Grid instance like in below code snippet,
|
import { GridComponent} from '@syncfusion/ej2-vue-grids'
.
.
public toolbarClick(args: ClickEventArgs) {
if (args.item.text === "PDF Export") {
(this.$refs.gridObj as GridComponent).ej2Instances.pdfExport();
} else if (args.item.text === "Excel Export") {
(this.$refs.gridObj as GridComponent).ej2Instances.excelExport();
}
} |
Modified sample for your reference,
Let us know if you have any concerns.
Regards,
Sujith R
Marked as answer
TE
teddygotts
August 5, 2020 02:44 PM UTC
Thank you for the quick reply to my query.
You really saved my day.
You really saved my day.
SK
Sujith Kumar Rajkumar
Syncfusion Team
August 6, 2020 04:49 AM UTC
Hi Teddygotts,
You’re welcome. We are glad to hear that your query has been resolved.
Please get back to us if you require any further assistance.
Regards,
Sujith R
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
- Marked answer
-
TE teddygotts
- Jul 30, 2020 03:56 PM UTC
- Aug 6, 2020 04:49 AM UTC