How do I know what event I am in?

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

In my .Net 1.1 C# windows form, I have a DataGrid DG1.
The DG1 have a column dc1 which format is TextBox.
And I want to check the whave value I have typed in.
My question is the new value doesn't really go into the DataGrid1's dc1
until some event occurs (e.g., KeyPress, KeyDown, ...)
but I don't know what the event is.
Is it possible to observe what event I'm in?
Thanks for help.


Jason
 
Hi,

In my .Net 1.1 C# windows form, I have a DataGrid DG1.
The DG1 have a column dc1 which format is TextBox.
And I want to check the whave value I have typed in.
My question is the new value doesn't really go into the DataGrid1's dc1
until some event occurs (e.g., KeyPress, KeyDown, ...)
but I don't know what the event is.
Is it possible to observe what event I'm in?
Thanks for help.

Jason

This is quite a common problem. For example people want to know if a
user changed a control, or whether it was changed programmatically.
Listbox one changes the value in listbox two, was it the user
selecting a new value or the change in listbox one?

The answer generally is to use flags. Set a bool to true when a
specific event fires and refer to that flag when you need to know the
current state. That would work for you too I think.
 

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

Back
Top