Hi, In all of your samples, you have shown the dialog window with a Button(click event of button to open dialog window). But I need to open it from typescript(either using constructor/ngOnInit/using isOpen Accessors). Can you please help me for this?..
Hello Shailesh,
Thank you for contacting Infragistics Developer Support!
Yes, it is possible to toggle the dialog component from your typescript code. You only need to get a reference to it from your component and use the dialog API to manipulate it.
I have also made a sample which showcases a dialog opening 3 seconds after the component has loaded.
Thanks..and how to bind the message from typescript?..I need to bind the message from typescript side..
If your dialog is a simple text box you can use the message property of the dialog instance in your typescript file. In the case of more involved templating you should just change the values inside the template before opening the dialog.
In the case of the provided sample above this will be:
ngAfterViewInit() { this.dialog.message = '<Your message here>'; setTimeout(() => this.dialog.open(), 3000); }