Retrieve RadGrid control dropdownlist selected values

5 posts, 0 answers
  1. nav100
    nav100 avatar
    48 posts
    Member since:
    Dec 2010

    Posted 24 Sep 2013 Link to this post

    I have RadGrid with DropDownlist. I am trying to find the value of each control by loop through using Javascript.  I am getting the findcontrol as 'null'. I have attached OnClientRatingSelectedIndexChanged in code behind for the dropdownlist 'Drop1'. What could be wrong? I appreciate any suggestions.

    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AlternatingItemStyle-HorizontalAlign="Left"
                                    <MasterTableView DataKeyNames="level_id" PageSize="10">
     <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Test"
                                                    <asp:Panel ID="Panel1" runat="server">
                                                        <asp:DropDownList ID="Drop1" runat="server"                                                                                                                                        AutoPostBack="true">


    function OnClientRatingSelectedIndexChanged(arg) {
            var grid = $find("<%=RadGrid1.ClientID %>");
            var MasterTable = grid.get_masterTableView();
            var Rows = MasterTable.get_dataItems();
            for (var i = 0; i < Rows.length; i++) {
                var row = Rows[i];
                var drop1 = row.findControl("Drop1");  
                var val1 = drop1.selectedValue;
  2. nav100
    nav100 avatar
    48 posts
    Member since:
    Dec 2010

    Posted 25 Sep 2013 Link to this post

    Telerik Experts, Could you please let me know how to retrieve the remaining Dropdownlist values when I select any one of Dropdownlist from RadGrid? I am stuck with this issue. Currently I have 5 rows in RadGrid. I have attached 
    OnClientRatingSelectedIndexChanged for this DropdownList. I would like to compare the other DropdownList 
    selected values when I select any one. Please let me know.
  3. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 26 Sep 2013 Link to this post


    Please try with the below code snippet.

    function test() {
                    var grid = $find("<%= RadGrid1.ClientID %>");
                    var MasterTable = grid.get_masterTableView();
                    var Rows = MasterTable.get_dataItems();
                    for (var i = 0; i < Rows.length; i++) {
                        var row = Rows[i];
                        var val1 = $(row.get_element()).find("div[id*='Panel1']").find("select[id*='Drop1']").val();
                        var val1 = $(row.get_element()).find("select[id*='Drop1']").val();;

    Please check the below link for more information.

    Access RadGrid Row and Column on Client Side :- (Get Template Column Control)

    Please post your grid related question in below forum so you will get answer quickly.

    Jayesh Goyani
  4. nav100
    nav100 avatar
    48 posts
    Member since:
    Dec 2010

    Posted 26 Sep 2013 Link to this post


    Thank you for the reply. I am getting       'Object doesn't support this property or method' error message on the following lines. Could you please suggest?



  5. Eyup
    Eyup avatar
    4080 posts

    Posted 27 Sep 2013 Link to this post

    Hi Nara,

    I have prepared a sample RadGrid web site to demonstrate how you can achieve the requested functionality. Please run the attached application and let me know if it helps you.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top