开发者

Tabindex for Dynamically created fields

I have a a gridview with a dynamic number of columns and rows. In each of the gridiview cells, a textbox get's added dynamicaly. I need users to be able to tab through these textboxes, but I can't get it to work.

I set the tabindex of the the textbox when it is created in the code behind, however when I try and tab in the page it doesn't work. If I click inside a textbox in the grdiview then pressing tab does nothing at all, If I click outside the gridview I can tab through the other controls on the page, and it will tab into the first cell of th开发者_JAVA百科e gridiview, and then stop/


Perhaps you can create a javascript method to get a list of all textboxes on the page, and shift focus to the next one, by checking for a keypress event?


Well I solved the problem. I had some javascript running on Key Down to prevent users entering anything other than numbers, which blocked tabbing. Removed it and it worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜