We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to show onscreen keyboard in tablet device while editing a cell in WinForms DataGrid (SfDataGrid)?

Platform: WinForms |
Control: SfDataGrid |
Published Date: November 29, 2018 |
Last Revised Date: January 10, 2020
Tags: editing, touch

Show onscreen keyboard

Programmatically launch the on-screen keyboard to open it through SfDataGrid.CurrentCellBeginEdit event when you begin editing in a cell.

C#

this.sfDataGrid.CurrentCellBeginEdit += sfDataGrid1_CurrentCellBeginEdit;
this.sfDataGrid.CurrentCellEndEdit += sfDataGrid1_CurrentCellEndEdit;
 
System.Diagnostics.Process process;
void sfDataGrid1_CurrentCellBeginEdit(object sender, CurrentCellBeginEditEventArgs e)
{
    process = System.Diagnostics.Process.Start("Osk.exe");
}
 
void sfDataGrid1_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
{
    if (!process.HasExited)
        process.Kill();
}

VB

AddHandler Me.sfDataGrid.CurrentCellBeginEdit, AddressOf sfDataGrid1_CurrentCellBeginEdit
AddHandler Me.sfDataGrid.CurrentCellEndEdit, AddressOf sfDataGrid1_CurrentCellEndEdit
 
Private process As System.Diagnostics.Process
Private Sub sfDataGrid1_CurrentCellBeginEdit(ByVal sender As Object, ByVal e As CurrentCellBeginEditEventArgs)
    process = System.Diagnostics.Process.Start("Osk.exe")
End Sub
 
Private Sub sfDataGrid1_CurrentCellEndEdit(ByVal sender As Object, ByVal e As CurrentCellEndEditEventArgs)
    If Not process.HasExited Then
       process.Kill()
    End If
End Sub

Sample: https://github.com/SyncfusionExamples/how-to-show-onscreen-keyboard-while-editing-a-cell-in-winforms-datagrid

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile