I spent a few hours ripping my hair out over this one - but it appears that there is a bug in the NodeCheck event in RadTreeView. It may be specific to Firefox/Mozilla, and i've tried the no-cache fix, with no luck.
As an example, create a TreeView with checkboxes=true, and populate it with say 10 nodes in the Page_Load event. Add a NodeCheck server side event (the function can be empty). Wrap the TreeView in an AjaxPanel, and run the project.
Check off all the boxes, and hit refresh on the browser (CTRL-R or F5). When the page reloads, either none of the nodes will be checked, or only the first node will be checked. It appears that the ViewState is not being saved after a NodeCheck event.
The hack solution i have for the time being is to add in an OnClientNodeChecked handler with the following:
Could you please confirm if this is in fact a bug, and if there will be a fix for this in an upcoming release?
Thanks,
N.
As an example, create a TreeView with checkboxes=true, and populate it with say 10 nodes in the Page_Load event. Add a NodeCheck server side event (the function can be empty). Wrap the TreeView in an AjaxPanel, and run the project.
<
telerik:RadAjaxPanel
ID
=
"rap2"
runat
=
"server"
>
<
telerik:RadTreeView
runat
=
"server"
ID
=
"tv1"
CheckBoxes
=
"true"
onnodeexpand
=
"tv1_NodeExpand"
onnodecheck
=
"tv1_NodeCheck"
>
</
telerik:RadTreeView
>
</
telerik:RadAjaxPanel
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack)
{
tv1.Nodes.Clear();
for
(
int
i = 0; i < 10; i++)
{
tv1.Nodes.Add(
new
RadTreeNode(i.ToString()));
}
}
}
Check off all the boxes, and hit refresh on the browser (CTRL-R or F5). When the page reloads, either none of the nodes will be checked, or only the first node will be checked. It appears that the ViewState is not being saved after a NodeCheck event.
The hack solution i have for the time being is to add in an OnClientNodeChecked handler with the following:
function
ClientNodeCheck() {
var
tree = $find(
"<%= tv1.ClientID %>"
);
tree.UpdateState()
}
Could you please confirm if this is in fact a bug, and if there will be a fix for this in an upcoming release?
Thanks,
N.