We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem/Bug while LoadOnDemand on treeview

Thread ID:

Created:

Updated:

Platform:

Replies:

70872 Jan 6,2008 11:18 AM UTC Jan 10,2008 01:34 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
Pierre-Alain Galtier
Asked On January 6, 2008 11:18 AM UTC

Hello,

I have a problem when expanding a node from a Treeview, using LoadOnDemand.

When clicking to a LoadOnDemand node, I set the child nodes checked property in server side to its parent value (the one which has been clicking : loadondemand node).

But then, if I immediately do a postback in the page, the childs nodes on which I have set the checked property are always "false" ! never true, even if they where checked after the LoadOnDemand server side event.

But something I noticed, is that afterthe LoadOnDemand has been done, if I check and uncheck the parent of the childs (the node on with LoadOnDemand), and if the treeview property AutoCheckChildNodes is true, then the bug is fixed. But it is not a solution for me.

Also, this bug (?) can easily be observed if you set a ClientObjectId to the treeview, and use the treeviewClientId.Refresh() method instead of doing a postback. The treeview will be refresh, and you'll see that the child nodes, are always checked to false, even if the LoadOnDemand server side code has set them to true.

Notice that this problem is with enableviewstate=true for the page and

---> I think the problem should come from the viewstate which is not updated after a LoadOnDemand event by the syncfusion API. But is correctly updated after checking/unchecking the node (with the AutoCheckChildNodes=true)

Two solutions I would like to try are :
-------------------------------------

1) execute ClienScriptBlock with the ScriptManager like Page.ClientScript.RegisterClientScriptBlock("myJavascript") or myScriptManager.RegisterClientScriptBlock("myJavascript") in order to check/uncheck the parent node of the child nodes, because I noticed that checking/unchecking on client side, after the LoadOnDemand be done, fixed the bug (a bad way to fix it)

2) Use an event like ClientSideOnLoadOnDemandExpanded but there is no event like this on the syncfusion Treeview.. (Notice that the ClientSideOnNodeExpand doens work with the LoadOnDemand -> it's another bug!!)
A ClientSideOnLoadOnDemandExpanded would help me to check/uncheck the parent node, as solution 1)


-----------
Can you help me please ?
-----------

Thanks a lot !


Rajarajeswari S [Syncfusion]
Replied On January 10, 2008 01:34 PM UTC


Hi Christophe,

Thanks for using Syncfusion products.

1) On a postback of the page, the childs nodes on which I have set the checked property are always "false" ! never true,

The issue mentioned here is suspected to be a defect and we have sent this to our development team for more analysis. We will update you once we get back from our development team.

2) I do not know how to execute some javascript when a LoadOnDemand has been done. How can I do it ?

Please refer the browser sample from the below link where you can get the JavaScript code to access the node:

C:\Documents and Settings\User Name\My Documents\Syncfusion\EssentialStudio\5.1.0.51\Web\tools.web\Samples\2.0\TreePackage\TreeView- Basic Features\ClientsideObjectModel\cs

Please let me know if you have any other concerns.

Thanks for your patience.

Regards,
Raji



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;