This is a migrated thread and some comments may be shown as answers.

[Solved] How to find dropdownlist control from Popup window

1 Answer 289 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Atul
Top achievements
Rank 1
Atul asked on 18 Nov 2014, 11:23 PM
Hi All,

I have created dropdownlist controls dynamically which I am displaying in popup window. I want to find out this all controls on specific button click event. 

I tried below different way but I am unable to find out this control. 

    var $formElements = $('#popup-window').find(':input').filter(function () {
     return $(this);
     });

     var name = [];
            var input = $('#popup-window').find("select").each(function (i) {
                name[i] = $(this).attr('id');
               });

   name = $.map($("div[id*=popup-window").find("select"), function (item, index) {
            return $(item).attr("id");
        });


So can you please help me how to find Dropdownlist control from popup window. 

Thanks-
Atul K.










1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 20 Nov 2014, 12:01 PM
Hello Atul,

I would suggest you look for HTML elements with data-role attribute. Try the following selector:
var ddls = $("div[id*=popup-window").find("[data-role=dropdownlist]");

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
DropDownList
Asked by
Atul
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or