Skip to content

I need KeyUp event of DataGridView current cell with current cell value during customer typing (not the value after cell editing being finished) #1572

Closed

Description

@itg-assistant

mgmst asked 2018-05-27 12:59:01 UTC

Hi!

I need KeyUp event of DataGridView current cell with current cell value during customer typing (not the value after cell editing being finished)

Is not there simple filter row for the DataGridView, as in many other DataGrid controls ( row staiyng on the top, being able to type in column cell, and content filtered under the typed values). Your conditional filter row is fancy but heavy UI for most of the use cases.

Thank you!

Activity

  1. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Luca answered 2018-05-28 18:09:27 UTC

    Please attach a test case showing the issue. I tried to attach KeyDown to the editor control and it works fine.

    The Wisej.Web.DataGridView doesn't support frozen rows yet. But you can use any other data grid that you like with Wisej. All the other grids have very limited server integration though, but may provide added client side functionality. You can find some examples here:

    https://wisej.com/blog/integration1/

    It's quite easy to drop in any other grid. The coding required is virtually identical (actually probably less) to what you'd have to code using any other system.

  2. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    mgmst answered 2018-06-02 12:50:17 UTC

    Thank you!

    Would you please publish here the code for attaching to editor control events, as I am not familiar with this technique of the DataGridView control.

    Thank you!

  3. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Frank (ITG) answered 2018-06-02 18:51:34 UTC

    Hi,

    you can achieve this with the following sample code:

    private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
    {
    e.Control.KeyDown -= Control_KeyDown;
    e.Control.KeyDown += Control_KeyDown;
    }

    Key events on the datagrid handle datagrid keys (up, down, etc). Keyevents on the editor handle the keyboard on the cell editor.

    Hope that helps.

    Best regards
    Frank

  4. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    mgmst answered 2018-06-07 14:04:36 UTC

    Hi,

    Public Class CDataGridView
    Inherits Wisej.Web.DataGridView

    Private Sub CDataGridView_EditingControlShowing(sender As Object, e As Wisej.Web.DataGridViewEditingControlShowingEventArgs) Handles Me.EditingControlShowing
    MsgBox(Me.CurrentCell.Value)
    End Sub

    End Class

    It does not work. Event does not fire during the typing into the grid cell.

    Best regards!

    Mario

  5. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Luca answered 2018-06-07 23:33:30 UTC

    There are several ways. One is to attach to DataGridView.EditingControlShowing and attach to e.Control.KeyDown. You should also detach, otherwise when the editor is reused you may attach more than once. This is what I used:

    private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
    {
    e.Control.KeyDown -= Control_KeyDown;
    e.Control.KeyDown += Control_KeyDown;
    }

    In other cases you may use a custom editing control, or you can handle the CellBeginEdit/CellEndEdit events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions