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