Due to having to disable a checkbox but still have it visible on the client side (using client side javascript to check and uncheck it as items in a grid underneath of it are checked) I have added an asp:CheckBox to a node on the server side with the following code:
RadTreeNode substanceNode = new RadTreeNode(substanceRow["Substance_Name"].ToString(), substanceRow["SUBSTANCE_ID"].ToString());
substanceNode.ExpandedImageUrl =
"~/Images/FolderOpen.gif";
substanceNode.ImageUrl =
"~/Images/FolderClosed.gif";
CheckBox indicator = new CheckBox();
indicator.Enabled =
false;
indicator.Visible =
true;
indicator.ID =
"chkSource";
substanceNode.Controls.Add(indicator);
How can I access this checkbox on the client side to work with it. Here is my client side code where I need to work with this checkbox
for (var i=0; i < nodes.length; i++)
{
if (nodes[i].get_value() == selectedSubstanceId)
{
checkbox = nodes[i].findControl(
"chkSource");
}
}
the rest of the logic is working fine I just can't get the checkbox to work with it.
the findControl returns null.
Any help to figure this out is greatly appreciated.
Thanks
John