Wednesday, March 28, 2012

Control Focus Inconsistent in Updatepanel on Update

Hi,

Any help would be appreciated in regards to the following problem:

I'm creating calculator-type applications and having problems with focus being lost from textbox controls that are inside of UpdatePanels when my UpdatePanels refresh. Because of the nature of the calculators, all of my textbox fields need to be inside of the update panel. As each textbox is filled out (which can be done in any order) other textbox values will change and adjust. This is all done using the July CTP of Atlas, and the TextChanged events of the TextBox controls.

My problem is that once a user changes the value of a textbox, the UpdatePanel refreshes (to adjust the other textboxes) causing the cursor to unfocus from the newly selected TextBox.

Thus, if the user tabs into a textbox in my UpdatePanel and adjusts the value, then presses tab again, their cursor will momentarily highlight the next textbox and then disappear entirely when the UpdatePanel is updated.

Thanks!

-Snickers

Use Javascript to do calculations and avoid code behind . your problem will be solved.

if there is some connectivity with database or some major code then use code behind

hope it helps

http://www.devguru.com/technologies/javascript/home.asp

No comments:

Post a Comment