Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
813
Setting focus to editable cells in WebGrid
posted

Hi,

I have a grid and I have some of the cells which are not editable. I am setting their CssClass to "GridLockedCell"

now I have CellChangeHandler which sets focus on editable cell only if its "mousedown" event.

moreover I have KeyDownHandler which checks if keypress is Tab then set focus on next editable cell.

 if I put the whole code for the second handler(KeyDownHandler)in try/catch block it is not working as per expectation.

It throwes Exception "Object Expected" (I debugged through code and found that it is trying to fire the 1st event Handler which I mentioned earlier.)

and another thing is if I do not have any try catch block then it is not showing any javascript error and code works fine. (may be in the background it is throwing exception but IG code is dealing with it).

also if I do not have 1st Handler then 2nd handler does not work at all (I don't know whats going on at that point.)

But my concern is I am not able to use try/catch block now because of this and somehow it might show javascript error to user.

Please let me know if by any change some one came accross this kind of Issue.

I am using. NetAdvantage 2008 Volume 2 CLR 2.0.

Thank you.