|
Rank: Newbie Groups: Member
Joined: 12/8/2008 Posts: 6
|
Hi Guys, I'm trying to handle ItemClick event for items populated on demand. For some reason event firesfor top level items only and after postback the tree collapses. Please see my code bolow. Am I missing something? I've tried to populate nodes via databinding as well and still no luck.
protected void Page_Load(object sender, EventArgs e) { treeRegions.Nodes.AddRange(GetNodes(null)); }
protected void treeRegions_ItemPopulate(object sender, EO.Web.NavigationItemEventArgs e) { EO.Web.TreeNode parentNode = (EO.Web.TreeNode)e.NavigationItem; parentNode.SubGroup.Nodes.AddRange( GetNodes( Convert.ToInt32(parentNode.Value) )); }
private NavigationItem[] GetNodes(int? nodeValue) { Region[] regions = RegionsBll.GetChildren(nodeValue); return Array.ConvertAll<Region, NavigationItem>(regions, ToNavigationItem); }
private NavigationItem ToNavigationItem(Region region) { // TreeNode is NavigationItem EO.Web.TreeNode item = new EO.Web.TreeNode(); item.Value = region.RegionId.ToString(); item.Text = region.Name; item.PopulateOnDemand = true; item.RaisesServerEvent = NullableBool.True; return item; }
protected void treeRegions_ItemClick(object sender, NavigationItemEventArgs e) { txtSelectedRegionName.Text = e.NavigationItem.Value; } Dll version: 6.0.51.2
Thank you, Serge
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have replied you via private message. You can click "Inbox" on the top of the forum to view the message.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/8/2008 Posts: 6
|
eo_support wrote:Hi,
We have replied you via private message. You can click "Inbox" on the top of the forum to view the message.
Thanks! For some reason it workes inside DetailsView > InsertItemTemplate, but it doesn't inside GridView > EditItemTemplate. Inside detailsView it keeps on appending copies. Turning off treeview's viewstate seems to solve both of these issues. Another issue just came up. With any child node selected, click on any other child node will reset the tree (ItemPopulate will not fire) Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Can you create a test page/project for us to demonstrate both problems?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/8/2008 Posts: 6
|
I can send you pages I am creating. Where do you want me to send them to? Basically this is what I am doing now: TreeView is inside web UserControl UserConrol is inside DetailsView > InsertItemTemplate and UserControl is inside GridView > UpdateItemTemplate Code behind for user control hasn't changed (see my first post) Page itself only binds gridView That's all Thanks Serge
|
|
Rank: Member Groups: Member
Joined: 11/21/2008 Posts: 15
|
Serge wrote:Hi Guys, I'm trying to handle ItemClick event for items populated on demand. For some reason event firesfor top level items only and after postback the tree collapses. Please see my code bolow. I have the same problem.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Amiran wrote:I have the same problem. Please check the latest build first. I believe this has been fixed since 2008.0.55. Thanks
|
|
Rank: Member Groups: Member
Joined: 11/21/2008 Posts: 15
|
eo_support wrote:Amiran wrote:I have the same problem. Please check the latest build first. I believe this has been fixed since 2008.0.55. Thanks Hi, I tried to install last build (2008.0.62), but I still have this problem.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Both us and other user have verified that the problem has been fixed. If you continue to have problem, please create a test product that reproduces the problem and send it to us. We will PM as to where to send. Please include detailed step by step instruction to reproduce the problem and make sure the test project can run independently.
Thanks!
|
|