DataGrid problem with tabindex

M

mac

I need to use keyboard to navigate through rows in datagrid(like ms excel)
and upon hitting enter the row should be selected.
I have this datagrid in a user control which is used on page at design time.
And smartNavigation is set to true on the page.

I have two problems

1. When ever there is postback when the row is selected, tabindex is lost
and upon hitting tab,the focus goes to address bar of IE browser.I would like
to have focus on the row selected, so that clicking tab goes to next row.

2. Clicking tab navigates through the rows and hitting enter postbacks fine.
But when i add one more button control, upon clicking enter on the row,
select command is not fired and button control does the postback. Is there
any way i can limit this.

I have button column for selection which is hidden. So i added
templatedcolumn as first column which has label control. In Item_Databound
event, i am setting tabindex to label. I am adding attribute to row for e.g
row.attribute.add("onkeydown","javascript:trapKeys"); This function traps the
enter key and does the postback as if it is selecting the row.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Check forms With JavaScript 1
Problem with KMKfw libraries 1
TabIndex 1
Help with popup display 1
TabIndex 4
Problem with window messaging system vc++ 2
Uhhhhh, What can I do next? 6
Problems with 'tabindex' 6

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top