This is a migrated thread and some comments may be shown as answers.

Ajax and InputManager Issues

6 Answers 62 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 26 Feb 2010, 10:09 PM
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

6 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 02 Mar 2010, 07:45 PM
Anyone?
0
Yavor
Telerik team
answered on 04 Mar 2010, 06:54 AM
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.
0
Shawn
Top achievements
Rank 1
answered on 04 Mar 2010, 01:07 PM
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?
0
Yavor
Telerik team
answered on 09 Mar 2010, 09:42 AM
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.
0
Shawn
Top achievements
Rank 1
answered on 09 Mar 2010, 02:14 PM
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.
0
Yavor
Telerik team
answered on 12 Mar 2010, 07:22 AM
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.
Tags
Ajax
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or