How can i disable left and right arrow key only on msflexgrid control


Recommended Answers

All 4 Replies


Disable the FlexGrid..

But, why do you want to do that..?


i have flexgrid with 3 columns and check1

when check1.value= 0 only 2 coloumns are available for entering text and when check1.value =1 all 3 columns are available for entering

when check1.value =0 right or left arrow takes the control to the coloums not available for entering text this i want to stope.


How you are allowing to edit the FlexGrid..?
Take care of that feature in Code itself..

If Check1.Value = 0 And Grd.Col = 2 then 'Change Column Number accordingly
    'Dont allow to edit
    Exit Sub
End If
'Code To edit /Place textbox on grid to edit...



I am shifting from using text box to enter data as it created problems with data being spread to other cells occationaly but could not figur out what is the problem. i do not have full proff code and its unreliable.

i am preventing entry in one column by setting the column width to 0. Also noticed that focus is not set to hidden column when value of check1 is set to hide colums . this should solve my problem of preventing focus with arrow keys but need confirmation if this is full proof.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.