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

selected value of radcomboBox inside radgrid in jquery

1 Answer 138 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Nilesh
Top achievements
Rank 1
Nilesh asked on 25 Feb 2015, 07:22 PM
I have radgrid and in the GridTemplateColumn iteam template  I have comboBox. On button click event, I want to get the selected value of the comboBox inside radgrid. I have used following jquery code but it not giving me right output

  $("#RadGrid1 tr").each(function () {
                            var testBit = $(this).find("select[class*=ddtestCombox]").val();
                            }
                        });

how do I accomplished this task using jquery?

Thanks

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 02 Mar 2015, 12:16 PM
Hi Nilesh,

You can use the following javascript to get reference of all RadComboBox-es on the page:

var combos = Telerik.Web.UI.RadComboBox.ComboBoxes;

or if you want to get the combos only from the grid:

<script>
    var $ = $telerik.$;
    var combos = [];
 
    function pageLoad() {
        $(".rgAltRow .RadComboBox, .rgRow .RadComboBox").each(function () {
            var comboId = $(this).attr('id');
            combos.push($find(comboId));
        });
    }
</script>


Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Nilesh
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or