Welcome Guest Search | Active Topics | Sign In | Register

Javascript error when callback panel contains a treeview and node style set Options
Phil Morris
Posted: Friday, May 25, 2012 7:06:53 PM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 35
Hi Jack.

Trust me to try a new version... d'oh!

With EO version 2012, there appears to be a problem (javascript error) if a treeview is embedded in a callback panel and the code behind attempts to set a style for a treenode.

Sample code: what is shown below demonstrates the error, but when the code line that sets the normal style of the primary node (primarynode.NormalStyle = primarystyle) is commented out no error occurs

Code: C#
if (!IsPostBack)
{
	// just try adding a node...
	ElementStyle primarystyle = new ElementStyle();
	primarystyle.CssText = "{  FONT-WEIGHT:bold;  FONT-SIZE: 12pt;  font-family:Arial;}";
	tvQualifications.Nodes.Clear();      // clear all nodes from the treeview
	EO.Web.TreeNode primarynode = new EO.Web.TreeNode("Some text...");
	primarynode.NormalStyle = primarystyle;
	primarynode.ShowCheckBox = true;
	tvQualifications.Nodes.Add(primarynode);
eo_support
Posted: Friday, May 25, 2012 8:19:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please remove the "{" and "}" from your CssText. That is not necessary. Once you remove that it should work fine.

Thanks!
Phil Morris
Posted: Friday, May 25, 2012 8:39:25 PM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 35
No, thank you!!!
eo_support
Posted: Friday, May 25, 2012 8:41:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
You are welcome. ; )


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.