Ajax and InputManager Issues

7 posts, 0 answers
  1. Shawn
    Shawn avatar
    83 posts
    Member since:
    Jan 2009

    Posted 26 Feb 2010 Link to this post

    If I have more than one input manager on a page, how can I enable or disable them based on the selection of a dropdown box?  I want to do it client-side so there is no postback. Is that possible?

    Here is my code sample: Multuiple Input Manager Sample
  2. Shawn
    Shawn avatar
    83 posts
    Member since:
    Jan 2009

    Posted 02 Mar 2010 Link to this post

    Anyone?
  3. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 04 Mar 2010 Link to this post

    Hello Shawn,

    Basically, the settings cannot be altered in such a manner dynamically. One possible option in this case would be the following. Let us assume, that you have two groups of input controls on the page, which are extended through separate input managers - group1, and group2. When the selection in the dropdown changes, you can hide the necessary group, and leave only the one, which meets the requirements for the proper settings. So, for example, you can have a group of numeric input, and one for entering dates. When the user wants to enter numeric input only, you can hide the date inputs, and vice versa. Altering the settings for the input managers on the client however, is not possible at present.
    I hope this information helps.

    Sincerely yours,
    Yavor
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  4. Shawn
    Shawn avatar
    83 posts
    Member since:
    Jan 2009

    Posted 04 Mar 2010 Link to this post

    Since I am unable to enable and disable the inputmanagers via client-side, can I add (and remove) the text boxes associated with the input manager client-side?

    If this is possible than I can simply add all of the controls that I need when the user selects "group 2" for instance and remove the ones they do not...  Make sense?
  5. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 09 Mar 2010 Link to this post

    Hi Shawn,

    In this case, as mentioned previously, the best strategy is to simply hide the textboxes on the client. In this way, they will be properly initialized, but only the ones which are needed will be shown the user. Let me know how this approach meets your requirements.

    Regards,
    Yavor
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Shawn
    Shawn avatar
    83 posts
    Member since:
    Jan 2009

    Posted 09 Mar 2010 Link to this post

    Hiding the textboxes on the client is actually the way I initially had it Yavor, but that doesn't seem to work.  When I do that, there is still an initialized inputManager on the page that is looking to validate them before the post can proceed.  I was putting all of the textboxes and the input manager for those boxes in a radAjaxPanel and hiding it when I needed to - but it wouldn't let me postback as long as it is waiting for those input manager requirements.
  7. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 12 Mar 2010 Link to this post

    Hello Shawn,

    Indeed, this is an expected behavior, since the client scripts are looking to validate these controls, prior to postback. One possible option in this case, is , in addition to hiding the controls, or their container, you can also preset some values in them. These values can be removed, whenever you toggle on their visibility.
    I hope this suggestion helps.

    Kind regards,
    Yavor
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top