TabIndex in XGRID

Hello,



I want to deactivate the automatic focus browsing in mygrid (tabIndex to -1), is there any function to use or modify ?





Thanks



AsaaDev

Normally , the grid has not any tabIndex defined, and not included in tab order of controls on the page. ( in can be included in tab-order by using setExternalTabOrder command )
So , in default case you need not do anything to prevent grid from tab-browsing.

If you want to disable tab-key processing in grid, it can be done by using

grid.attachEvent(“onTab”,function(){
return false;
})


thanks for your quick response,



I’m adding this line code in mygrid description but it doesn’t work.

Working sample was sent by email

By the way, which version of grid you are using? Older versions may not support such event.

I’m using v2. with IE6,
My cells are editable , and I have 2 link action one for edition and the other for delete.

In case of 2.0 version , you can change code as

grid.attachEvent(“onKeyPress”,function(key){
if (key == 9 ) return false;
return true;
})

Yes, now it’s OK :slight_smile:

NB : With the first event “onTab”, it seems to work if I click in a cell before tab-browsing, so the event is detected just after a click in mygrid.

Thank you,