Window and Validators in UpdatePanel

  1. #1

    Window and Validators in UpdatePanel

    V .8.2

    I have a Windows nested within an update panel and use CooliteScriptManager.AddUpdatePanelToRefresh() to update the window. I have a couple questions.


    1. When the callback occurs, it appears that javascript destroys and recreates the current window. Can't it just do a check to see if the component already exists?


    2. Lets say i am toggling the visbility of a validator. It seems as though the destroy and recreate of the window corrupts the event handlers that remove the validator from Page_Validators. If i toggle visibility on a validator in a callback, the Page_Validators does not update and the page will attempt to perform validation on controls that no longer exist. Question/Suggestion #1 may solve the problem.


    Does V1 have better support for these type of scenarios?


    Thanks,
    Matt
  2. #2

    RE: Window and Validators in UpdatePanel

    Hi Matt,

    How about just using an AjaxEvent instead of an UpdatePanel.


    Can't it just do a check to see if the component already exists?

    That's what an UpdatePanel does. It destroys and recreates the object, or just overwrites.


    Geoffrey McGill
    Founder
  3. #3

    RE: Window and Validators in UpdatePanel

    Well, i have the window in an update panel becuase i want to create the window and its contents on demand within a callback. Its more efficient that trying to load each possible type of popup at the time the page loads. Its ok with me that the update panel replaces all the content. But the problem is, it seems like when the component is destroyed then the appropriate events aren't raised to remove the validators from the page. Perhaps there is another way to accomplish what i am ultimately trying to do - load the window and contents when it is actually needed. My struggle is that we are trying to implement coolite into an existing app and its got to place nice with the existing asp.net architecture. EG update panels, standard validators, etc.

    Thanks,
    Matt

Similar Threads

  1. [CLOSED] Validators is not working
    By supera in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 06, 2012, 5:08 PM
  2. How can I use validators?
    By flormariafr in forum 1.x Help
    Replies: 1
    Last Post: Jan 21, 2010, 2:19 PM
  3. how to use validators in coolite 7
    By joydeepsen in forum 1.x Help
    Replies: 2
    Last Post: Jun 02, 2009, 7:17 AM
  4. [INVALID] asp:UpdatePanel and ext:Window
    By haltenberg in forum Bugs
    Replies: 8
    Last Post: Jun 11, 2008, 12:41 PM

Posting Permissions