Backslash in datagrid not working

  • Thread starter Thread starter Bj?rn Jansson
  • Start date Start date
B

Bj?rn Jansson

Hi,
I have a databound datagrid. It is bound to an array of custom
objects. The object contains a string Property that is editable in the
datagrid.
It works fine for any charachters, except the backslash character
('\'). When I enter a backslash it seems as if the editbox looses
focus. If I continue to write characters they doesn't show up until I
click another cell and then the original data is gone and only the
text I wrote after the backslash is left.

I've searched for this problem on the net but can't find anything
about it. Does the datagrid behave this way for any of you?

I'm using C# and .Net 1.1

Best regards
Björn Jansson

(this thread is moved from microsoft.public.dotnet.framework.windowsforms.controls)
 
Hi,

I've had a similar problem with the NumPad + key - it is treated as a
control keystroke (which expands/collapses child rows) even in the edit
mode.
I managed to fix it by overriding the ProcessCmdKey method and adding
handling for the WM_KEYDOWN event and also by overriding ProcessKeyPreview
and ProcessDialogKey and blocking default handling for this key.
 
Back
Top