I use the new MultiView in a form for making customer reservations. The first panel contains a GridView used to select the customer. The OnSelectedIndexChanged event fills the customer info on the reservation page and then switches to that page of the MultiView. This worked just fine until I added Partial Page Rendering to the GridView using the UpdatePanel. The AJAX is terrific as far as refreshing the grid. I have an alphabet selector at the top of the screen and also a TextBox with associated button to search for specific text. This all works great with AJAX. I only have the grid inside of the UpdatePanel and I have ChildrenAsTriggers set to false. The triggers are specified as the events of the search button and the alphabet selector change event.
Here's the problem. In the AJAX version, when the Select LinkButton on the grid is clicked, the screen stays static - just the first time it's clicked. When clicked the second time, the process continues and functions correctly. If I turn on trace, I can see that the code in the OnSelectedIndexChanged event is executed - up to a point, but then it just stops and the screen remains showing the grid. No error is thrown. I suspect it deals with the MultiView, but I don't understand why it works on the second click.
Environment Notes: EnableEventValidation is set to false in the page declaration. If it is set to true, the the OnSelectedIndexChanged causes an error to be thrown. ChildrenAsTriggers is set to false. I'm using the Beta 2 release and the Nov CTP. I am using a MasterPage, but the ScriptManager is in the content page.
Does anybody have any clues as to this behaviour.
Try to setChildrenAsTriggers="false"and UpdateMode="Conditional"in asp:UpdatePanel.Maybe debug is the best way to fix the problem.
Try to refer to the?following links?to?debug?client?javascript for reference.
Fiddler http://www.fiddlertool.com
Jasson,
Thanks for your reply. I have tried setting ChildrenAsTriggers to false and UpdateMode has always been conditional. After more research, I am thinking that my issue has to do with a user control (the alphabet selector) that I have on the page. Using trace, just after the call to change the index of the MultiView, the code jumps to the constructor of the user control and then immediately stops running and just shows the original view. I have tried to programatically Dispose of the user control and even got a reference to it and set it to null but I have the same reaction. Ironically, the second time the Select link button is pressed, the process continues correctly.
Here is another strange issue - on a different form. I have a RadioButtonList whose SelectedIndexChanged event is a trigger for an UpdatePanel. If I pre-set the value of the RadioButtonList when I populate it using either SelectedIndex = 0; or by using ButtonList.Items[0].Checked = true; then that specific button of the list does not fire the AutoPostBack when clicked. All the others do. If I don't pre-set any buttons, then they all work fine. The RadioButtonList is not inside the update panel but it is identified as a trigger in the triggers tag of the panel.
I don't think MS AJAX extensions are ready for prime-time yet.
R. Harrold
Yeah, I ran into the RadioButtonList problem and spent ridiculous amount of time to figure it out till I saw your post. I cannot believe AJAX has been shipped with such issue.
I am having a problem with the MultiView inside an UpdatePanel, The multi view has 2 views with buttons on each...
When clicking on the button contained inside the second view (when the 2nd view is active) an error mesage box is displayed (javascript client error) stating that: 'null' is null or not an object. I am not trying to fix the error on the client side (i know what null is and how to validate it). But rather is there a way to fix this on the server side maybe an option used with the UpdatePanel control ?
I think I got the problem, The button on the second view is simply a "continue" button meaning it just forwards client to another page.
Since the error was on the client side, the problem I think was solved by setting:CausesValidation="false" for the button.
 
No comments:
Post a Comment