We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to pass the data inside dialog box and bind it

Thread ID:

Created:

Updated:

Platform:

Replies:

147346 Sep 4,2019 05:31 AM UTC Sep 10,2019 10:52 AM UTC Angular - EJ 2 5
loading
Tags: Dialog
thowfik
Asked On September 4, 2019 05:31 AM UTC

How to pass the data inside dialog box and bind it 
for example 
i want to open the dialog box and pass the id to that dialog box on clicking a button.
Thanks in Advance
Regards
Thowbik

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On September 5, 2019 01:34 PM UTC

Hi Thowfik,  
 
Thank you for contacting Syncfusion support. 
 
Before proceeding further on this query, we would like to confirm whether you are using EJ1 Dialog or EJ2 Dialog. Please provide more details for your requirement. 
 
Regards, 
Vinoth Kumar S 


thowfik
Replied On September 5, 2019 01:54 PM UTC

I am using  EJ2 Dialog 
1.on clicking a button some data like id,index that need to be passed as parameter to dialogbox  
on clicking a submit button of the dialogbox i need to get the id and index that is passed 
Thanks in Advance 
Regards
thowfik


Buvana Sathasivam [Syncfusion]
Replied On September 6, 2019 05:17 PM UTC

Hi Thowfik, 

Thanks for your update. 

We have analyzed your requirement.  We have created a simple sample based on your requirement using ng-model. 


In above sample, we have covered the below. 
  • Rendered the Listbox component with Databinding.
  • Open the Dialog component with list box selected items when click the button.
  • Get the input elements value when dialog submit button is clicked.

Regards, 
Buvana S 
 


thowfik
Replied On September 9, 2019 07:31 AM UTC

Hi 

In my scenario  the selected item will not be global it is a local variable that can be accessed within the function.
My exact requirement is 
I have a list of array. on selecting a particular item i need to pass the index of the particular item to dialogbox and do some operation with that index onclicking the submit button  of the dialogbox. each item of the list will have different index and it can be accessed only within the select function 
i have attached a image for my requirement kindly look at it 
Thanks in Advance
Regards
Thowfik

Attachment: sample_5cbdc15c.zip

Narayanasamy Panneer Selvam [Syncfusion]
Replied On September 10, 2019 10:52 AM UTC

Hi Thowfik, 
 
Thanks again for the update. 
 
We have validated your query. Please find the validation details in below, 
 
Due to the dialog is layout component, you cannot send and process the data with dialog component. But you can achieve mentioned requirement through component interaction from the application end. 
  
We have prepared stackblitz sample to meet your requirement, please get it from the below link, 
  
The above sample was prepared on the basis of the following constrains, 
1.       Created New child component (FormDialogComponent) and rendered dialog in that child component. 
2.       In the parent component (AppComponent), selected item data passed by calling child component public method with arguments, through the first dropdownlist select event callback. 
3.       Child component will receive the value from callback function and assigned to component variable 
4.       Once submit button clicked saved data item processed for condition checking and required output emitted to parent component. 
5.       Parent component receives the emitted values and update it to the second dropdownlist value. 
 
 
Regards,  
Narayanasamy P.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon