Get ID of dynamically created dropdownlist

Hi,

I have a dropdown list like this

<ej-drop-down-list id=@("selectadults-" + Model) target-id=@("numberOfAdultsList-" + Model) width="100%" watermark-text="Select" change="registration.selectAdults_dropdown"></ej-drop-down-list>

How do I get the ID of the dropdownlist in the change event? I tried looking through the properties of e, but I can't seem to find the control ID

1 Reply

KR Keerthana Rajendran Syncfusion Team October 10, 2017 06:23 AM UTC

Hi Louis,   
 
Thank you for contacting Syncfusion support. 
   
We can get the id of DropDownList in change event by using the below code   
   
  function registrationselectAdultsdropdown(args)   
    {   
        console.log(this._id);   
   }   
   
We have attached a sample for your reference. Please download the sample from    
   
   
Regards,      
Keerthana.  
 


Loader.
Up arrow icon