DataGrid edit question

S

Steve

I need to respond to a user editing text in a cell. I need to take action
BEFORE they actually edit something, the likely place to do this was the
KeyDown event, but I can't get it to fire. I click in a cell, it highlights
it, then I type and the event never fires... What am I missing?

I understand that the datagrid is a "bound control", but for my needs, I
bind it to data I don't want changed, in the event that a user wants to
change it, I create a copy of the data and bind that so they can edit away.

Anyone have a suggestion that would help me catch the start of an edit in a
datagrid?

Thanks for reading,
Steve
 
C

Claes Bergefall

Overriding one of the following methods might work:
DataGridTextBoxColumn.ColumnStartedEditing
DataGridTextBoxColumn.Edit
DataGridTableStyle.BeginEdit
DataGrid.BeginEdit

/claes
 
S

Steve

Man, I do not like the DataGrid at all :(

Thanks for the suggestions Claes, but I haven 't been able to get them to
work.
If anyone else has any suggestions for me, I would REALLY appreciate them at
this point.

Thanks,
Steve
 

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