I have added a radionButtonList controll to a RadTreeNode (Part 1). Now when i try to save the values according to the selected value of RadioButtonList , am not able to do that. Its not allowing me to convert that not back to a radiobutton list (part 2). I have added the code i used. Please correct me if am wrong and tell me how to achive it.
part 1) // adding RadioButtonList to treenode.
RadTreeNode brandNode1 = new RadTreeNode(Name,Value); // node
RdTree_TeamBrand.Nodes.Add(brandNode1 ); // adding node to the tree -'RdTree_TeamBrand'
RadioButtonList radioblist = new RadioButtonList(); //defining a radio btn list
radioblist.Items.Add(
new ListItem("P", "1"));
radioblist.Items.Add(
new ListItem("S", "0"));
brandNode1.Controls.Add(radioblist); // adding radioblist to controls of brandNode1
part 2) // retriving the selected RadioButtonList value . This part not working.
RadioButtonList drplst = (RadioButtonList)RdTree_TeamBrand.Nodes[0].Controls[0]; // not working
or
RadioButtonList drplst = RdTree_TeamBrand.Nodes[0].Controls[0].FindControl(RdTree_TeamBrand.Nodes[0].Controls[0].ClientID)
//some thing like this also not working