I have a large rad tree view that is fully expanded with checkboxes enabled.
The problem I have is that this type of UI makes it hard for users to see which items are checked. The checkbox is small and the text does not show as being selected so the user has to scan each item to see if it is checked.
So I want to hightlight the checked nodes.
There appears to be a difference between the Server + Client setting of the CSS for nodes. On page load I set the css class by ServerSide and then when the user checks or unchecks on the client side I set it using client side events.
Server Side
RadTreeNode node = RadTreeView1.FindNodeByValue(ID);
node.CssClass = "RadNodeSelected";
Client Side
var node = eventArgs.get_node();
node.set_cssClass("RadNodeSelected");
If you make the cssClass "RadNodeSelected" have something like the following you really see the issue I have.
.RadNodeSelected
{
font-weight: bold;
color: Purple;
border : Red dotted 5px;
}
This is what is rendered from the server side - as you can see the setting of the cssClass only applies to the SPAN for the text of the node.
<DIV class=rtTop><SPAN class=rtSp></SPAN><SPAN class=rtMinus></SPAN><INPUT
class=rtChk type=checkbox CHECKED><SPAN
class="rtIn RadNodeSelected">Trimble</SPAN> </DIV>
and when using the client side to set the CSS it applies to the DIV tag of the node and not the SPAN for the text.
node.set_cssClass("RadNodeSelected");
<DIV class="rtTop rtSelected RadNodeSelected"><SPAN class=rtSp></SPAN><SPAN
class=rtMinus></SPAN><INPUT class=rtChk type=checkbox CHECKED><SPAN
class="rtIn RadNodeSelected">Trimble</SPAN> </DIV>
and client side to remove the CSS
node.set_cssClass(null);
<DIV class="rtTop rtSelected"><SPAN class=rtSp></SPAN><SPAN
class=rtMinus></SPAN><INPUT class=rtChk type=checkbox><SPAN
class="rtIn RadNodeSelected">Trimble</SPAN> </DIV>
I am using RadControls for ASPNET AJAX Q1 2008 and I just noticed a new update for Q2 so I will pull that down and see if it has the same problem.
Am I just using the wrong methods to do what I want or is this a bug?
Chris