This is a migrated thread and some comments may be shown as answers.

Load On Demand Q1 2011

9 Answers 139 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
erwin asked on 19 Mar 2011, 06:47 PM
Is there a way I can force the + / expansion image on a node when the children are load on demand and I know that there will be existing child nodes.

9 Answers, 1 is accepted

Sort by
0
erwin
Top achievements
Rank 1
Veteran
answered on 19 Mar 2011, 08:03 PM
Well I found a way using the follwing code in the NodeFormatting Event Handler
TreeNodeInfo info = e.Node.Tag as TreeNodeInfo;
if (info!=null)
{
    if (info.PotentialChildNodes > 0)
    {
        e.NodeElement.ExpanderElement.Visibility = ElementVisibility.Visible;
    }
}

where TreeNodeInfo is a custom class that stores additional info about the node.
This seems to work but now I get some extra space left of the node until I expand it for the first time.
0
Julian Benkov
Telerik team
answered on 23 Mar 2011, 04:19 PM
Hi erwin,

Please find the answer in your support ticket.

All the best,
Julian Benkov
the Telerik team
0
Graden Kirksey
Top achievements
Rank 2
answered on 23 Mar 2011, 05:35 PM
Can you please post the answer to this here so we can all see it. I have the same issue.
0
Graden Kirksey
Top achievements
Rank 2
answered on 25 Mar 2011, 03:13 PM
Can someone PLEASE post the solution to this padding issue?  I am having the exact same issue, and if it has a solution, I would be very grateful if it was shared.

Thanks,
Graden
0
erwin
Top achievements
Rank 1
Veteran
answered on 25 Mar 2011, 03:43 PM
Hi Graden,

I opened a bug ticket and provided a demo project for that problem. I'll keep the forum posted about results if that's not done by telerik staff.  No workaround provided up until now.

Regards
Erwin
0
Graden Kirksey
Top achievements
Rank 2
answered on 25 Mar 2011, 03:44 PM
Thank you very much!

g
0
erwin
Top achievements
Rank 1
Veteran
answered on 20 Apr 2011, 07:55 AM
As it seems the bug indent bug with the NodesFormatting event is not fixed in 2011.419.

I'll give the revised NodesNeeded Mechanism a try.

Erwin
0
erwin
Top achievements
Rank 1
Veteran
answered on 20 Apr 2011, 02:12 PM
NodesNeeded Event seems to work OK with 2011Q1SP1 with correct indent/padding of nodes.
However you'll have to tweak your loading logic slightly if you previously used the NodeExpanding Events.

Regards
Erwin
0
Julian Benkov
Telerik team
answered on 22 Apr 2011, 01:48 PM
Hi Erwin,

I am glad to hear that you find the previously experienced issues addressed. Feel free if you have additional questions or feedback to share.

Regards,

Julian Benkov
the Telerik team
Tags
Treeview
Asked by
erwin
Top achievements
Rank 1
Veteran
Answers by
erwin
Top achievements
Rank 1
Veteran
Julian Benkov
Telerik team
Graden Kirksey
Top achievements
Rank 2
Share this question
or