Load On Demand Q1 2011

10 posts, 0 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 19 Mar 2011 Link to this post

    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.
  2. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 19 Mar 2011 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 23 Mar 2011 Link to this post

    Hi erwin,

    Please find the answer in your support ticket.

    All the best,
    Julian Benkov
    the Telerik team
  5. Graden Kirksey
    Graden Kirksey avatar
    4 posts
    Member since:
    Aug 2009

    Posted 23 Mar 2011 Link to this post

    Can you please post the answer to this here so we can all see it. I have the same issue.
  6. Graden Kirksey
    Graden Kirksey avatar
    4 posts
    Member since:
    Aug 2009

    Posted 25 Mar 2011 Link to this post

    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
  7. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 25 Mar 2011 Link to this post

    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
  8. Graden Kirksey
    Graden Kirksey avatar
    4 posts
    Member since:
    Aug 2009

    Posted 25 Mar 2011 Link to this post

    Thank you very much!

    g
  9. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 20 Apr 2011 Link to this post

    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
  10. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 20 Apr 2011 Link to this post

    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
  11. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 22 Apr 2011 Link to this post

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready