Below is the code for dropdown . i had implemented this in dialog ej2.But when i open and select the value from dropdown . and Close the dialog and again open the dialog then i want to show the initial value to be the value in dropdown.:
Hi Harleen,
You can set the value property of the dropdown list when opening the dialog as shown below.
function dialogOpen(): void { games.value = 'CA'; } |
Sample: https://stackblitz.com/edit/zilvaj-d2zhuh?file=index.ts,index.html
If we have misunderstood the issue you are facing, could you please modify the provided sample according to your specific scenario? Additionally, kindly provide us with step-by-step instructions to replicate the issue and, if possible, a video illustrating the problem.
Regards,
Kokila Poovendran.
This is my dialog code :
Hi Harleen,
We apologize for any inconvenience you've experienced. Based on the code you provided, we have created a new sample to better understand the issue you're facing. However, we suspect that the problem might be related to how the dialog content is loaded from another page. To assist you further, could you please share the code that handles the content property? This will provide us with more insights into the situation.
In our investigation, we noticed that in our code, we ensure the dialog is destroyed each time it's closed, and then re-rendered when opened again. It would be helpful if you could confirm whether you are implementing a similar approach. If you have a runnable sample, kindly share it with us so that we can better understand your specific requirements.
To further assist you, we have prepared a sample that you can access here:
Sample: https://stackblitz.com/edit/zilvaj-bgvtko?file=index.ts,index.html,dataSource.json