6 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Dec 2012, 04:58 AM
Hi David,
Try overriding the default CSS as follows to achieve your scenario.
CSS:
Hope this helps.
Regards,
Princy.
Try overriding the default CSS as follows to achieve your scenario.
CSS:
<style type=
"text/css"
>
.RadTreeView_Default .rtPlus, .RadTreeView_Default .rtMinus
{
display
:
none
!important
;
}
</style>
Hope this helps.
Regards,
Princy.
0
Aravind
Top achievements
Rank 1
answered on 27 Apr 2013, 04:19 PM
hai
I am new to radtreeview,i need to hide "+" symbol and enable checkboxes,and if i click parent checkbox it expand all its child node,if i again uncheck the checkbox it collapse in client side (Javascript),pls send some coding part.
Regards
Aravind
I am new to radtreeview,i need to hide "+" symbol and enable checkboxes,and if i click parent checkbox it expand all its child node,if i again uncheck the checkbox it collapse in client side (Javascript),pls send some coding part.
Regards
Aravind
0
Aravind
Top achievements
Rank 1
answered on 29 Apr 2013, 04:01 AM
Hai
Here i attach the screenshots for radtreeview without "+" or "-" symbol and also left side line (mention in 1st attachment).What i need is mention in 2nd attachment.i use the following css
but it give leftside like mention in 1st attachment,pls see and reply me asap.
And also i need to check and uncheck the checkbox based on if condition in javascript.
client side code is
function onClientNodeClickedHandler(sender, eventArgs) {
var node = eventArgs.get_node();
}
node.set_selected(false);
eventArgs._node.checked = false;
node.set_checked = false;
eventArgs._node._properties._checked = false;
nodetext.checked = ture;
node.get_checked() = ture
the above 6 lines are check and unchecked the child node but not work pls reply me.why i ask for unchecked is i have to count the checked node,if count is greater than 10 it automaticall uncheck the lastly checked node.i have done count the checked node and if the the count is greater than 10 it goes to else part,in else part i want to uncheck the lastly checked node.
here my code is
var hdFldLang = document.getElementById("ctl00_ContentPlaceHolder1_hdLangCount").value;
if (hdFldLang > 20) {
node.set_selected(false);
eventArgs._node.checked = false;
node.set_checked = false;
eventArgs._node._properties._checked = false;
nodetext.checked = ture;
node.get_checked() = ture
}
else
{}
Thanx
Aravind
Here i attach the screenshots for radtreeview without "+" or "-" symbol and also left side line (mention in 1st attachment).What i need is mention in 2nd attachment.i use the following css
<style type=
"text/css"
>
.RadTreeView_Default .rtPlus, .RadTreeView_Default .rtMinus
{
display
:
none
!important
;
}
</style>
And also i need to check and uncheck the checkbox based on if condition in javascript.
client side code is
function onClientNodeClickedHandler(sender, eventArgs) {
var node = eventArgs.get_node();
}
node.set_selected(false);
eventArgs._node.checked = false;
node.set_checked = false;
eventArgs._node._properties._checked = false;
nodetext.checked = ture;
node.get_checked() = ture
the above 6 lines are check and unchecked the child node but not work pls reply me.why i ask for unchecked is i have to count the checked node,if count is greater than 10 it automaticall uncheck the lastly checked node.i have done count the checked node and if the the count is greater than 10 it goes to else part,in else part i want to uncheck the lastly checked node.
here my code is
var hdFldLang = document.getElementById("ctl00_ContentPlaceHolder1_hdLangCount").value;
if (hdFldLang > 20) {
node.set_selected(false);
eventArgs._node.checked = false;
node.set_checked = false;
eventArgs._node._properties._checked = false;
nodetext.checked = ture;
node.get_checked() = ture
}
else
{}
Thanx
Aravind
0
Shinu
Top achievements
Rank 2
answered on 29 Apr 2013, 07:20 AM
Hi,
I suppose you want to check child nodes on checking parent node. Here is the sample code.
aspx:
Thanks,
Shinu
I suppose you want to check child nodes on checking parent node. Here is the sample code.
aspx:
<
telerik:RadTreeView
ID
=
"RadTreeView1"
CheckBoxes
=
"true"
TriStateCheckBoxes
=
"true"
CheckChildNodes
=
"true"
runat
=
"server"
>
</
telerik:RadTreeView
>
Thanks,
Shinu
0
Aravind
Top achievements
Rank 1
answered on 30 Apr 2013, 07:35 AM
hai Shinu
Thank you for ur reply
Thank you for ur reply
<
telerik:RadTreeView
ID
=
"RadTreeView1"
CheckBoxes
=
"true"
TriStateCheckBoxes
=
"true"
CheckChildNodes
=
"true"
runat
=
"server"
>
</
telerik:RadTreeView
>
checking parent node is used for expand and collapse and not for check and uncheck the all child nodes,my need is without
"+" and "-" symbol only need checkboxes to expand and collaspes the parent node,screenshots poseted in previous question,and checked
count is above 10 it uncheck the lastly checked child node.(that means if u checked 10 nodes and now got to check 11th one it show the
messagebox and unchek the 11th then only cheked count is 10).i am finish count the checked node just i need uncheck the node is count
greater than 10.
Regards,
Aravind
0
Hello Aravind,
Plamen
the Telerik team
You can achieve such custom functionality by using expand() or toggle() of RadTreeNode Client Object and checking the checked child nodes count as in the GetNodes() sample function in the same help article.
Hope this will be helpful.
Plamen
the Telerik team
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 their blog feed now.