I am usign a datagrid and the first column is locked. I have set the tab index for the grid to 0. how can i set focus to the second column of the grid?? since the first one is locked I need it to go to the second column..
Enabled is set to true..It still wont let me set focus..the first column is locked and the tab index is set to 0..if I unlock the column it will go right to the first column no problem. it must have something to do with the first column being locked...when I open the grid and hit tab, it will then jump to the second column but I cannnot set focus to the second column..
dvannoy@onyxes.com
Ok...that worked, but there is still another problem. and this may be a VB thing.. the code I have in the load event of the form to set the focus on a column in the grid works fine now.. but I also have a button that does the same thing as the load event and the grid will lose focus. I have tryed Refresh etc.. after clicking the button you can see the cursor move to the column I want to set focus to..but then it jumps back to the locked column(0).. I have tryed moving the code around and nothing works..
strGrid = "Select ddhunb,spg,totalgal,drmsize,h20,reliq,sdpo,sdebris,drmcond FROM AS400 WHERE Document LIKE '" & sName & "'"
Set rsGrid = New ADODB.Recordset
rsGrid.CursorType = adOpenDynamic
rsGrid.CursorLocation = adUseClient
rsGrid.LockType = adLockPessimistic
rsGrid.Open strGrid, strCn
If Not (rs.EOF And rs.BOF) Then
rs.MoveFirst
Me.DrmDataGrid.Col = 1
SetDrumInfoText
Sorry dvannoy - I was hoping that something would jump out at me, but the code looks exactly the same for both Click Events (as you said). Good luck finding a solution. If I run across anything, I'll post again.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.