W
Woody Splawn
We have a client server application where we would like to not show Save and
Cancel buttons on a winform until the user has actually entered something
into a textbox or combobox etc., and there is something to actually save.
This logic is fundamental to the way we would like to do things in general
so it is worth our while to get this figured out correctly once and for all.
To my mind, what needs to be done is to be able to detect when the user has
entered edit mode. We have discovered a way that works, but it's kind of
kludge. We have discovered that we can make use of onKeyPress and detect
when a key is entered. When a key is pressed this effectively means the
user is in edit mode but there are catches. What if the user selects
something from a combobox instead of using the keyboard? we would then have
to trap for keyboard changes, listbox selections and one and on. I think
there is a better way but am not sure what it is.
There are two different issues - one with fields on a winform and another
with regard to grids on a winform. I have a question about grids posted
elsewhere.
Does anyone else have a better way for us to be able to detect if the user
has entered edit mode? I am aware that you can trap for column changing but
this only fires after the user has entered something and is getting ready to
leave the column. This is not what we want. We are hoping that something
fires as soon as the user makes a change to any cell so we can trap for it
and thereby make the buttons visible when they should be.
Anyone?
Cancel buttons on a winform until the user has actually entered something
into a textbox or combobox etc., and there is something to actually save.
This logic is fundamental to the way we would like to do things in general
so it is worth our while to get this figured out correctly once and for all.
To my mind, what needs to be done is to be able to detect when the user has
entered edit mode. We have discovered a way that works, but it's kind of
kludge. We have discovered that we can make use of onKeyPress and detect
when a key is entered. When a key is pressed this effectively means the
user is in edit mode but there are catches. What if the user selects
something from a combobox instead of using the keyboard? we would then have
to trap for keyboard changes, listbox selections and one and on. I think
there is a better way but am not sure what it is.
There are two different issues - one with fields on a winform and another
with regard to grids on a winform. I have a question about grids posted
elsewhere.
Does anyone else have a better way for us to be able to detect if the user
has entered edit mode? I am aware that you can trap for column changing but
this only fires after the user has entered something and is getting ready to
leave the column. This is not what we want. We are hoping that something
fires as soon as the user makes a change to any cell so we can trap for it
and thereby make the buttons visible when they should be.
Anyone?