473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

state of a panel, form??

hello,

i have got a panel with several controls in it, including a button which is
disabled.
I want to enable this button whenever, any of the controls inside the panel
changes.

e.g. someone has typed in the textbox,
the datagrid has been edited,(a user edits or inserts a new cell)
a checkbox is checked.

Is there anyway to do this?

Thanks,

Doug
Nov 15 '05 #1
1 1381
Hi doug,

Of course, I think now of two possibilities, one on the events handlers of
those controls ( checkbox, grid, textbox , etc ) enable the button ( you can
check some condition too ) . the other will be create a function where check
all the conditions under which it can be enabled, then add this method to
the handler of each of the controls, this second apprach may be a little
more difficult as you can have more than one signature of event handlers, so
maybe you have to cope with more than one method:
// NOT TESTED CODE
protected void CheckForGrid( object sender, DataGridCommandEventArgs e )
{
CheckGeneric(sender );
}
protected void CheckGeneric( object sender, EventArgs e )
{
CheckGeneric(sender );
}

protected void CheckGeneric( object sender)
{}
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Doug" <do**********@flytxt.com> wrote in message
news:ug**************@TK2MSFTNGP10.phx.gbl...
hello,

i have got a panel with several controls in it, including a button which is disabled.
I want to enable this button whenever, any of the controls inside the panel changes.

e.g. someone has typed in the textbox,
the datagrid has been edited,(a user edits or inserts a new cell)
a checkbox is checked.

Is there anyway to do this?

Thanks,

Doug

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Harry | last post by:
Hi, Can anyone help. I have a asp.net page (c#), with two panels, both of which have asp:textboxes on. When I press the first button, the second panel shows fine. When I press the button in...
2
by: Lerp | last post by:
Hi all, I was just playing around with some code to hide/show panels and I discovered that I am losing a variable's value when my sub is called from a button in paneltwo. Why is this? Cheers...
1
by: Novice | last post by:
Hey all, I have finally managed to create a Custom WebControl and am using a technique from another programmer to maintain state between pages - I would just like to validate this idea. ...
2
by: P. Gruenhagen | last post by:
I've written several UserControls that contain different versions of a form that users need to fill out. Depending on which role a user is logged in as, I load the appropriate UserControl and add...
2
by: geodev | last post by:
Hello, I’m currently writing an asp.net application that will be running on a Windows XP Professional workstation utilising IIS and MSDE Database. At a later date this application will need to...
2
by: Peteroid | last post by:
When the application I'm working on is run it creates a panel with a Paint event customized to draw primitives (circles, rectangles, etc.), places the panel on a form, and then launches the form....
4
by: Lloyd Dupont | last post by:
The code snippets are below. I write in (C#) a Page object in a control library. I'm using this page as an HtppHandler in a website (which referes the DLL). This page contains 2 panels (one is...
1
by: clintonG | last post by:
I'm having a problem maintaining state with a Panel control in a MasterPage and I need help thinking through this process. The basic structure of the HTML in the Master looks like this... ...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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...
0
tracyyun
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.