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? 3 2024
Woody,
I've dealth with this problem many times. It is less painful to simply trap
the TextChanged event of a textbox, combobox, or datagrid cell. This event
triggers when the control's text changes with keyboard input, item
selections, etc...
-Fabricio fg************* @yahoo.com
"Woody Splawn" wrote: 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?
Are you suggesting that I trap the texchanged event of every textbox or
combobox etc., on the form? This seems rather onerous.
I have been told elsewhere that what I am really trying to do is to check to
see if the row is dirty.
"Fabricio" <Fa******@discu ssions.microsof t.com> wrote in message
news:5E******** *************** ***********@mic rosoft.com... Woody,
I've dealth with this problem many times. It is less painful to simply
trap the TextChanged event of a textbox, combobox, or datagrid cell. This
event triggers when the control's text changes with keyboard input, item selections, etc...
-Fabricio fg************* @yahoo.com
"Woody Splawn" wrote:
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?
Yes, precisely what I suggested... trap the textchanged event. VB.NET allows
you to attach multiple delegates from different controls to a single event
handler (i.e. you only need one function to handle all the textchanged
events).
-Fabricio
"Woody Splawn" wrote: Are you suggesting that I trap the texchanged event of every textbox or combobox etc., on the form? This seems rather onerous. I have been told elsewhere that what I am really trying to do is to check to see if the row is dirty.
"Fabricio" <Fa******@discu ssions.microsof t.com> wrote in message news:5E******** *************** ***********@mic rosoft.com... Woody,
I've dealth with this problem many times. It is less painful to simply trap the TextChanged event of a textbox, combobox, or datagrid cell. This event triggers when the control's text changes with keyboard input, item selections, etc...
-Fabricio fg************* @yahoo.com
"Woody Splawn" wrote:
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? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: NewToDotNet |
last post by:
Hi,
I am very new to ASP.NET and web programming in general. I have one issue. I have a Datagrid object with Edit template. In one Datagrid row, I have 1 DropdownList, 1 textbox and 1 readonly textbox in Edit mode. I have written OnTextChanged event handler for text box and OnSelectionIndexChanged event handler for dropdownlist. Whenever a text...
|
by: sck10 |
last post by:
Hello,
I am trying to change a value when a user goes into edit mode on a
DetailsView control. I am trying to use the following, but can not figure
out how to get to the bound field ("MyBoundField") to set its new value.
Any help with this would be appreciated.
Sub EmployeeDetailView_ModeChanged(ByVal sender As Object, ByVal e As...
|
by: Dean Slindee |
last post by:
In my application there is a main form with a tabcontrol. On each page in
the tabcontrol is a panel upon which is painted a "sub" form. The main form
acts as the "application host", while the subforms are where data values
contained in underlying tables are displayed, inserted, updated or deleted.
I don't make the user press an "Edit"...
|
by: wandii |
last post by:
Hi,
I have a datagrid attached to a dataset. It displays the records
fine however, when I edit one
of the cells it does not change the edit icon to the pencil icon on the
left of the row I just changed. I have the allowediting property set
to true which should upon editing a cell indicate
row is in edit mode. How can I set the edit mode ?...
|
by: phamer |
last post by:
Hello. My switchbaord contains 2 options: add a record and edit a
record. So, of course, if I click add a record, the first form opens
in add mode; if I click edit, the first form opens in edit mode. BUT,
when I click on the nav buttons I've created on the forms, the next
form will only open in the mode specified by the code for that button....
| |
by: rn5a |
last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB
table. Users can modify the records using this DataGrid for which I am
using EditCommandColumn in the DataGrid. This is the code:
<script runat="server">
Dim sqlConn As New SqlConnection(".....")
Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)
If Not...
|
by: savajx1 |
last post by:
I need to dynamically create a set of bound fields contained in a
GridView control. I also have a single static CommandField that I can
declare in the Columns <tagof the GridView control. I have to add
controls dynamically as I am trying to write a reusable , general ,
spreadsheet like display control that can take advantage of the built-
in...
|
by: =?Utf-8?B?bWlrZWc=?= |
last post by:
Hi,
I am building a small Help Desk application for my company and need to be
able to edit "open" help desk issues. I use a simple datagrid to display
each issue (6 per page) , with an Edit button. There are a lot of fields
across, and my Network Admins would like a way of editing/updating each
issue seperately in a a vertical form. I...
|
by: Ryan Liu |
last post by:
I have this problem: "cannot continue edit while debug in VS2005".
I see the same tread after I search this topic in google, but none solutions
works for me. So again, I ask here. Can someone give a hand?
Has MS fixed this in VS 2005? Is is fixed in VS 2008?
Thanks,
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |