Radtreelist Client Side

1 posts, 0 answers
  1. karthika
    karthika avatar
    1 posts
    Member since:
    Oct 2017

    Posted 18 Dec 2017 Link to this post

    Hi,

    I have created the application with Radtreelist control. I have used datagrid as one of the template column.

    In radtreelist, i have one asp:checkbox, and the datagrid has one checkbox. My requirement is when i click on the checkbox in the radtreelist, it automatically should select the checkbox in the datagrid. Am using javascript, but it throwing error in find element. Please assist me. 

     function Checked(btn, e) {
                    var radgrid = $find("<%= RadBOMTreeList.ClientID %>");
                    var row = radgrid.get_dataItems();
                    for (var i = 0; i < row.length; i++) {
                        var Rows = row[i];
                    var chk = radgrid.getContainerItem("chkItemNoBOM");
                        var grdDrawings = Rows.findElement("grdDrawings");
                        //Get all input elements in Gridview
                        var inputList = grdDrawings.getElementsByTagName("input");
                        for (var j = 0; j < inputList.length; j++) {
                            if (chk.checked == true) {
                                if (inputList[j].type == "checkbox") {
                                    chk.checked = true;
                                    inputList[j].checked = true;
                                }
                            }
                            else {
                                chk.checked = false;
                                inputList[j].checked = false;
                            }
                        }
                    }
                }

Back to Top