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. Ajax Toolkit Accordion Control Problem

Ajax Toolkit Accordion Control Problem

Scheduled Pinned Locked Moved ASP.NET
help
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.
  • E Offline
    E Offline
    ednrg
    wrote on last edited by
    #1

    I have a form with a data bound accordion on it. It's being data bound the standard way: Accordion1.DataSource = dt.DefaultView; Accordion1.DataBind(); ... The entire form works perfectly at this stage. There is a major problem when I add a row to the datatable and rebind it. DataRow newDr = dt.NewRow(); ... dt.Rows.Add(newDr); Accordion1.DataSource = dt.DefaultView; Accordion1.DataBind(); At this point, the accordion rebinds, and it displays correctly on the page. But there is a problem. When I do any action on the page, the code behind doesn't see the new row. In fact, all the values from the accordion are null or string.Empty. I then checked view source on the browser, and it doesn't show anything for the new row. It seems like it doesn't exist, but it is there on the screen. As usual, I am under an extreme deadline, and ANY suggestions would be greatly appreciated. I'm sure it's something very stupid that I am missing. Thanks

    L 1 Reply Last reply
    0
    • E ednrg

      I have a form with a data bound accordion on it. It's being data bound the standard way: Accordion1.DataSource = dt.DefaultView; Accordion1.DataBind(); ... The entire form works perfectly at this stage. There is a major problem when I add a row to the datatable and rebind it. DataRow newDr = dt.NewRow(); ... dt.Rows.Add(newDr); Accordion1.DataSource = dt.DefaultView; Accordion1.DataBind(); At this point, the accordion rebinds, and it displays correctly on the page. But there is a problem. When I do any action on the page, the code behind doesn't see the new row. In fact, all the values from the accordion are null or string.Empty. I then checked view source on the browser, and it doesn't show anything for the new row. It seems like it doesn't exist, but it is there on the screen. As usual, I am under an extreme deadline, and ANY suggestions would be greatly appreciated. I'm sure it's something very stupid that I am missing. Thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      just add proper data to the newly added row. Like, newDr["name"]="Jinal Desai" Then might be your problem solved.

      Jinal Desai - LIVE Experience is mother of sage....

      E 1 Reply Last reply
      0
      • L Lost User

        just add proper data to the newly added row. Like, newDr["name"]="Jinal Desai" Then might be your problem solved.

        Jinal Desai - LIVE Experience is mother of sage....

        E Offline
        E Offline
        ednrg
        wrote on last edited by
        #3

        Thanks for your reply, but I am doing that. In my original message, I replaced the assignment portion of the code with "..." to save space and to not take away from the real issue, which is that the control does not maintain state across postbacks when the datasource has been changed. I put a ticket into Microsoft, and they confirmed my findings. The problem is that they created the controls and put them out to open source, so they will not fix the problem.

        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