Good day;
It seems that the postback texchanged event of a radinput(textbox) control interferes with opening a radwindow as a popup. The net effect is that the window (dialog) will open and close automatically.
Unfortunatley; copyright laws prevent me from posting the source but I will do my best to explain it correctly.
I'm working on a user control composed of:
- RADINPUT(TEXTBOX) (autopostback off)
- ASP IMAGE BUTTON
- RAD WINDOW object, set to modal, with the navigateurl set to "dialog.aspx", linked to the ASPIMAGEBUTTON via OpenerElementID
The Popup page, say dialog.aspx is composed mainly of:
- Textbox to enter search value
- asp image button - triggers off the search
- radgrid to display the results
The objective of the control is to provide a text thats tied to a search dialog. If the user doesnt know the value they can search for it via the dialog, select the value they want and bring it back to the text box.
Everything works well and is awesome. Except, a new requirement came in. God wants whatever text that users type in the textbox of the user control come across to the search dialog window and be defaulted into the textbox for the search. Perfectly reasonable.
In order to achieve this I added a querystring value to carry the value from the textbox into the dialog.aspx. In order to modify the navigateurl of the radwindow I added codebehind to the textchanged event of the user control textbox and turned on its autopostback. Mostly it works....however.....there is one scenario where I believe the postback from the textbox control is interfering with the rad windows opening.
The scenario is:
Enter text into the textbox; without tabing out or hitting enter; click on the image button.
The action above should cause the following in order:
1. Run textbox.textchanged event and Update the navigateurl of the radwindow.
2. Open the rad window dialog.
What actually happens is that the radwindow opens and closes. If I click on the image to open it again, it seems the navigateurl did not get updated by the textbox event. In other words, it seems that clicking on the button while the focus is still on the textbox causes the postback from the textbox to get shorted and the opening of the dialog to be aborted.
I have managed to work around this by turning off the textbox's autopostback and adding some client side code. However, if in the future we need to activate the autopostback for the textcontrol in order to manage the textchanged event on any asp that implements it the problem will resurface.
Thanks in advance for the help;
David