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. Image for the cookie policy date

How to pass the data inside dialog box and bind it

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

5 Replies

VK Vinoth Kumar Sundara Moorthy Syncfusion Team 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 



TH thowfik 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



BS Buvana Sathasivam Syncfusion Team 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 
 



TH thowfik 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


NP Narayanasamy Panneer Selvam Syncfusion Team 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.  


Loader.
Live Chat Icon For mobile
Up arrow icon