locked
Datagridview On Data Entry Event handler

    Question

  • Hi,

    If I wanted a character in a datagridviewcolumn replaced when it's typed, not when the cell is left, how could I achieve that? Is there an eventhandler tied to that?

    Thanks,
    Davy

    Monday, April 16, 2012 6:45 AM

Answers

  • Hi,

    why would you want to do that? If it is a matter of decimal points vs decimal comma's, the problem exists for the entire program, so in that case i'd suggest to hook the message queue and replace the characters there.  Have a look at the

    IMessageFilter

    interface.

    In case you only want the grid, have a look at the editcontrol property of the grid, and try to add a keypressed eventhandler. In that eventhandler you could replace characters.


    Regards, Nico

    Monday, April 16, 2012 7:22 AM