Backslash in datagrid not working

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)
 
D

Dmitriy Lapshin [C# / .NET MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top