views:

403

answers:

4

I am having some problems with tabbing within my asp.net pages. This project was developed with Visual Studio 2008.

Case 1

I have two html tables. The first table has two rows; the second table has four rows. Within the cells are of each table are asp.net fields, text boxes and radio button lists. I set focus to the first field of table one. I then press the tab key multiple times. The focus moves through the field of table one and then through the fields in the first row of the table two. Then instead of goes to the second row of the table two it return to the table one.

But if I set focus to the last cell on the first row of table two, it tabs through the remaining cells of table two properly. Can you tell me how to get the tabbing to behave properly and go to the cells in there natural order? Note that I am setting the tab index property in the order that I want.

Case 2

On another page I have an html table with a single row followed by a gridview control. The gridview control is writeable and has the following columns: Check Box, Radio Button List, Text Box, Text Box, Text Box and a Check Box List. If I click on one of Check Box, Radio Button List or Check Box List., then press tab, the cursor pops out of the grid and sets focus on the first field of the table outside the grid. But if I set focus on one of the text boxes and tab; then the tab goes through the fields of the grid left to right one row at a time. This later behavior is what I want in both cases. I don’t know why my cursor pops out of the grid when I start with a field other than a text box.

Please help if you can.

Bob

A: 

funny, you explain in details your case but you didn't explain what it needs to be explained in order to someone can understand you :)

first of all, is table1 located in the first tab and table2 in second tab? what do you used for tabs: asp.net tab control, jquery ui tabs...? what do you mean by 'press the tab key multiple times'? same tab? do you have postback on tab click? what is the focus in your case, and so on and on...

cheers

Marko
He is referring to using the tab key on the keyboard to navigate the inputs, not tabs as a UI element for displaying different windows of data.
RedFilter
A: 

OrbMan is right, sorry if I wasn't clear. The user users the tab key to move focus from one field to another. It is suppose to move from left to right and then down. My problem is it doesn't always work that way.

Bob Avallone

Bob Avallone
Hi Bob - you seem to have logged in as a different user - I appreciate you can't comment yet (which is what this would be better as), but you could also modify your question to include this note ;)
Zhaph - Ben Duguid
Ben, I don't understand what your asking me to do here. I created my question as an anonymous user and later registered as a user. I don't known how to fix it though.Bob Avallone
Bob Avallone
Ben, I can't seem to reply to your other comment so I will comment here, which is what I think you were saying in your note.First, thanks for the reply and for helping me. As I understand how tabbing works you either set all the tabindexes to 0 in which case the tabbing will direct the user left to right and up and down or you can specific the order by setting the tabindex property to 1,2,3 etc. I tried both method and both give me the same results that I explain in my original note. There is no reference to the tabindex property anywhere in my code behind i.e. .cs files
Bob Avallone
A: 

Have you checked the order of the input elements in your HTML? Generally the tab order follows the order of controls.

If that all looks right, then make sure nothing is setting the TabIndex property - as this will also mess up the tab order.

Zhaph - Ben Duguid
A: 

I pretty much resolve this and I wanted to add the answer for anyone who viewed this thread. The problem was the autpostback on certain fields. Once I disabled autopostback, the problems went away.

Bob

Bob Avallone