GrapeCity MultiRow Windows Forms Documentation
WantsInputKey Method (IEditingCell)
Example 


A System.Windows.Forms.Keys object that represents the key that was pressed.
Determines whether the specified key is a regular input key that the editing cell should process.
Syntax
Function WantsInputKey( _
   ByVal keyData As Keys _
) As Boolean
Dim instance As IEditingCell
Dim keyData As Keys
Dim value As Boolean
 
value = instance.WantsInputKey(keyData)
bool WantsInputKey( 
   Keys keyData
)

Parameters

keyData
A System.Windows.Forms.Keys object that represents the key that was pressed.

Return Value

true if the specified key is a regular input key that should be handled by the editing cell; otherwise, false.
Remarks
If this method returns true for a special keyData, this means the keyboard message is handled by the editing cell; otherwise, this means the editing cell expects GcMultiRow to handle this keyboard message.
Example
The following code example shows how to use this method to customize an editable cell's keyboard behavior. This code example is part of a larger example provided for the IEditingCell interface.
public bool WantsInputKey(Keys keyData)
        {
            // Tell MultiRow control that the cell will handle '+','-', and left, right key in edit mode.
            if (keyData == Keys.Add || keyData == Keys.Subtract || keyData == Keys.Left || keyData == 
Keys.Right)
            {
                return true;
            }
            return false;
        }
Public Function WantsInputKey(ByVal keyData As Keys) As Boolean Implements IEditingCell.WantsInputKey
        ' Tell MultiRow that the cell will handle '+','-', and left, right key in edit mode.
        If keyData = Keys.Add OrElse keyData = Keys.Subtract OrElse keyData = Keys.Left OrElse keyData = 
Keys.Right Then
            Return True
        End If
        Return False
    End Function
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IEditingCell Interface
IEditingCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.