Since i m replacing my application from Serdian Grid to UltraWingrid i could like to know whether UltraWingrid has any Property or feature like Serdian where i can lock upanddown navigation using up and down arrow keys .the property in sheridan are :
RowNavigation :- 1.) 0-ssRowNavigationFull 2.) 1-ssRowNavigationRKLock
3.) 2-ssRowNavigationUDLock 4.) 3-ssRowNavigationAllLock
i am using
UltraGrid1_KeyDown()
Dim newMapping, newMappingUp, newMappingDn As GridKeyActionMappingnewMapping = New GridKeyActionMapping(Keys.Tab, UltraGridAction.ActivateCell, UltraGridState.InEdit, 0, SpecialKeys.All, 0)newMappingUp = New GridKeyActionMapping(Keys.Up, UltraGridAction.ExitEditMode, 0, 0, SpecialKeys.All, 0)newMappingDn = New GridKeyActionMapping(Keys.Down, UltraGridAction.ExitEditMode, 0, 0, SpecialKeys.All, 0)
Me.UltraGrid1.KeyActionMappings.Add(newMapping)Me.UltraGrid1.KeyActionMappings.Add(newMappingUp)Me.UltraGrid1.KeyActionMappings.Add(newMappingDn)
it works for the up and down key, but Suppose when i reach the last cell of the row(A) for example then it go to first cell of the next row(B) , which i want to block, that is no use of up and down keys at all..............
can u help MIKE or Brian!!!!!!!!!!!!
yes i want to prevent arrow key navigation. i just gave u an example of how i am using it fro the tab key which is working fine, Same way HOW can i use it for up and down Arrow Keys, I want a options rather than Coding line if possible...................Thankx in Advance
I am under the assumption that you want to prevent arrow key navigation. If that is the case, iterate the KeyActionMappings collection, and add each mapping that has a KeyCode of Keys.Up, Keys.Down, Keys.Left, or Keys.Right toa list, then (outside that loop) remove each of these entries from the KeyActionMappings collection. Note that some of the actions might not be navigational, so you might want to take a look at the ActionCode property for each one to make sure it is a navigational action.
Dim newMapping As GridKeyActionMappingnewMapping = New GridKeyActionMapping(Keys.Tab, UltraGridAction.ActivateCell, UltraGridState.InEdit, 0, SpecialKeys.All,0)Me.UltraGrid1.KeyActionMappings.Add(newMapping)
i am using this for tab navigation in grid cell
tell me how ..................plz................for up and down keys
newMapping = New GridKeyActionMapping(Keys.Up,?,?,?,?, ?)Me.UltraGrid1.KeyActionMappings.Add(newMapping)