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

Radtreelist Client Side

0 Answers 62 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
karthika
Top achievements
Rank 1
karthika asked on 18 Dec 2017, 02:21 PM

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;
                        }
                    }
                }
            }

No answers yet. Maybe you can help?

Tags
TreeList
Asked by
karthika
Top achievements
Rank 1
Share this question
or