Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with treeview control's postback

Problem with treeview control's postback

Scheduled Pinned Locked Moved ASP.NET
helpdata-structurestutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeeva Mary Varghese
    wrote on last edited by
    #1

    Hi All, I'm facing a problem with the page postback. Its like....I have a treeview control whose first three levels are populating on page load. The next levels are being populated on “treeview_treenodeexpanded” event ,based on certain criteria .But each time we expand it the page gets posted back, as it is the case. I want the postback to be blocked somehow and the tree nodes need to be populated on expand event only. Is AJAX a solution for this? If so, how to implement this?:confused: I hope someone can help me out with this. Thanks in advance. Regards, Jeeva

    B 1 Reply Last reply
    0
    • J Jeeva Mary Varghese

      Hi All, I'm facing a problem with the page postback. Its like....I have a treeview control whose first three levels are populating on page load. The next levels are being populated on “treeview_treenodeexpanded” event ,based on certain criteria .But each time we expand it the page gets posted back, as it is the case. I want the postback to be blocked somehow and the tree nodes need to be populated on expand event only. Is AJAX a solution for this? If so, how to implement this?:confused: I hope someone can help me out with this. Thanks in advance. Regards, Jeeva

      B Offline
      B Offline
      badgrs
      wrote on last edited by
      #2

      The “treeview_treenodeexpanded” event is server-side so therefor a postback is required for this event to fire. The treeview has a built in Ajax-style feature that populates child nodes without a postback. To use it you have to set the PopulateOnDemand property of nodes to true. However this will only work with the TreeNodePopulate event, not TreeNodeExpanded. You would have to change the populating code to use that event instead.

      J 1 Reply Last reply
      0
      • B badgrs

        The “treeview_treenodeexpanded” event is server-side so therefor a postback is required for this event to fire. The treeview has a built in Ajax-style feature that populates child nodes without a postback. To use it you have to set the PopulateOnDemand property of nodes to true. However this will only work with the TreeNodePopulate event, not TreeNodeExpanded. You would have to change the populating code to use that event instead.

        J Offline
        J Offline
        Jeeva Mary Varghese
        wrote on last edited by
        #3

        I 'll work with this. Thanks a lot. Regards, Jeeva:)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups