RADAjaxManager and Composite Controls

10 posts, 0 answers
  1. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 19 Feb 2008 Link to this post

    My work requires me to create composite controls on a regular basis.  Often I want these controls ajaxified.

    But, I'm having trouble using the RadAjaxManager in a composite control.
    I've done an exhaustive search through these forum and find others encountering similar problems with dissimiliar project requirements, but the solutions suggested either don't apply or don't work.

    First Question:
    In a Custom Composite Control, how does one check for the existence of a RadAjaxManager on the page and when does one do it. 

    Second Question:
    I do some recursive enumerations to find the RadAjaxManger on the page, currently.  Its ugly, but it works.  However, each time I reference the RadAjaxManager already existent on the page, the AjaxSettings count of said reference = 0, even though I've added AjaxSettings previously and those settings work seem to work.

    After obtaining said reference, I then attempt (in the Composite Control ) to add AjaxSettings to the manager.  If I attempt this in the Composite Control's OnInit I get 'Object not set to an Instance of an Object', although all objects involved are indeed NOT NULL.

    If I make the same attemp in the Composite Control's OnLoad, I get an error claiming that the Page object can not be null.  I didn't pass in a page object, the RadAjaxManager was already on the page and I got a reference to it.  This error doesn't seem to detail the actual problem.

    I can not isolate the problem into a test project because of the project's requirements.

    Anyone have any suggestions how to use RadAjaxManager from customer Composite Controls?
  2. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 19 Feb 2008 Link to this post

    EDIT: Removed after further findings...


  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 20 Feb 2008 Link to this post

    Check that, the problem rears again.

    I don't have any clue why, but the RadAjaxManager does not like to be used in a composite control.

    Please feedback on this issue is greatly appreciated.
  5. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 21 Feb 2008 Link to this post

    It appears, not many are familiar with the use of the RAD Ajax Manager control in composite or custom controls.  Charting new ground I guess.

    Here's what I've found on this issue. 

    It's very important to insure that the Ajax Manager is added to the Page.Form object prior to OnLoad.  OnInit is the most obvious choice for this.  Otherwise, you may encounter both Page null errors and Object not set to an object instance exceptions when attempting to add AjaxSettings to the Ajax Manager.

    This creates a HUGE challenge if the developer's intent is to include the Rad Ajax Manager in his composite control payload.  Choosing to include the Rad Ajax Manager in the composite control payload restrict at which point in the page lifecycle the composite control can be instantiated.

    Can anyone from Telerik confirm this issue and expound upon it?




  6. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 22 Feb 2008 Link to this post

    Hello Doug Beard,

    You can get reference to the RadAjaxManager through its static method GetCurrent.

    Can you please give us more details on the exact case in which you find difficulties using RadAjaxManager?

    To your question, if I have got it right -- yes, you have to add RadAjaxManager before any control tries to use it. I have attached a simple project where similar scenario is demonstrated. Please, feel free to modify it, to better fit your needs.

    Regards,
    Rosen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 22 Feb 2008 Link to this post

    Nah, per my comment, I am in fact adding the RadAjaxManager before any controls that use it, that's not the problem.

    You've completely missed the point. 

    Again, in the scenario you've chosen to attach, the RadAjaxManager is added to the PAGE!!! Not through the composite control.  The composite control you've attached simply checks for the RadAjaxManager and errors if one does not exist.  This is not what I'm looking for.

    As I said above:
    What if the developer chooses to include the RadAjaxManager with the composite control payload.  We can not ensure that the consumer of the composite control has placed a RadAjaxManager on the page and telling them to add one is not a adequate solution.
  8. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 22 Feb 2008 Link to this post

    Hi Doug,

    Dynamically adding  RadAjaxManager through the page from custom controls is not supported at this time. I suggest, if it is appropriate in your scenario, to use RadAjaxPanel instead. 

    Best regards,
    Rosen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 22 Feb 2008 Link to this post

    Panels are not an acceptable solution in my case.
    Will this be addressed?
  10. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 25 Feb 2008 Link to this post

    Hello Doug Beard,

    This issue is logged in our database and therefore most probably will by addressed in one of the future releases of the Prometheus controls.
    Excuse us for the inconvenience.

    Greetings,
    Rosen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 25 Feb 2008 Link to this post

    Great to hear.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017