How to get datagrid cell value while typing in it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • James Roy
    New Member
    • Nov 2010
    • 2

    #1

    How to get datagrid cell value while typing in it?

    Hi all,
    I have a datagrid and one specific column is editable. I want while i am typing in one of the cells of this column when i press a Function key (Example F7) to get what i have write. Till now i get an empty string because the cell is empty for the datagrid cause the cellendedit has not fired. I tried the ProcessCmdKey event to catch the F7 and still i get the empty string. For example i write the word Marl in the cell and then i press F7. I want to get Marl. Is there a way to get this value?

    Thanks.
  • James Roy
    New Member
    • Nov 2010
    • 2

    #2
    Hi guys,

    I found something that solved my problem, I hope it is helpfull for u too.
    I used the code below

    datagridview.ed itingcontrol.to string.substrin g(datagridview. editingcontrol. tostring.indexo f(":") + 1)

    and that code return the string i wanted to get.

    Comment

    Working...