Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I stop expanding the nodes when user presses the * on the numeric keypad?

0
Posted

How can I stop expanding the nodes when user presses the * on the numeric keypad?

0

There are at least two options to do it: • Using the ExpandOnKeys property. Specifies a value that indicates whether the control expands or collapses a node when user presses arrow keys. If the ExpandOnKeys property is False, the ‘*’ on numeric keypad has no effect. In the same time, left arrow key, ‘-‘ on the numeric keypad, right arrow key, ‘+’ on the numeric keypad will not expand or collapse the focused item. • Using the KeyDown event handler like follows: Private Sub Grid1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyMultiply Then If (Shift = 0) Then KeyCode = 0 End If End If End Sub The code still allows you to use the CTRL + ‘*’ on the numeric keypad to expand nodes. In order to disable completely the ‘*’ feature you have to comment the ‘Shift = 0’ statement.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.