473,698 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid checkbox events

hiya,

I have got a checkbox in one of my cells in the ediit
item template. Now i need to enable/disable a
textbox in another boundcolumn.

the problem i am facing is the checkchanged event is not
raised or for some reason, the control does not enter the
function. I have made the function as protected and
specified the function name in the html for the checkbox
but i still do not get an event.

is this possible, what is wrong here

fred
Nov 18 '05 #1
5 6695
Checkchanged event doesn't cause postback, it is raised if the checkbox
value changed between postbacks.

Eliyahu

"fred" <an*******@disc ussions.microso ft.com> wrote in message
news:25******** *************** ******@phx.gbl. ..
hiya,

I have got a checkbox in one of my cells in the ediit
item template. Now i need to enable/disable a
textbox in another boundcolumn.

the problem i am facing is the checkchanged event is not
raised or for some reason, the control does not enter the
function. I have made the function as protected and
specified the function name in the html for the checkbox
but i still do not get an event.

is this possible, what is wrong here

fred

Nov 18 '05 #2

eliyahu,

How can i enable/disable the textbox in my boundcolumn
from a control in another column

thanks for your help

-----Original Message-----
Checkchanged event doesn't cause postback, it is raised if the checkboxvalue changed between postbacks.

Eliyahu

"fred" <an*******@disc ussions.microso ft.com> wrote in messagenews:25******* *************** *******@phx.gbl ...
hiya,

I have got a checkbox in one of my cells in the ediit
item template. Now i need to enable/disable a
textbox in another boundcolumn.

the problem i am facing is the checkchanged event is not raised or for some reason, the control does not enter the function. I have made the function as protected and
specified the function name in the html for the checkbox but i still do not get an event.

is this possible, what is wrong here

fred

.

Nov 18 '05 #3
Do you mean you have a checkbox in one column and want to enable/disable a
textbox in another? If it's the case, I recommend doing it on client side
with a javascript function. Add a client-side onclick event to the checkbox.
In the event handler function find and enable/disable the textbox. This is
the fastest solution, no round trips involved. There is a number of things
you have to know though. To add a client-side event handler use Attributes
properties of the checkbox. Do it for every data row in the grid's
ItemDataBound event handler. Good luck.

Eliyahu

"fred" <an*******@disc ussions.microso ft.com> wrote in message
news:25******** *************** ******@phx.gbl. ..

eliyahu,

How can i enable/disable the textbox in my boundcolumn
from a control in another column

thanks for your help

-----Original Message-----
Checkchanged event doesn't cause postback, it is raised

if the checkbox
value changed between postbacks.

Eliyahu

"fred" <an*******@disc ussions.microso ft.com> wrote in

message
news:25******* *************** *******@phx.gbl ...
hiya,

I have got a checkbox in one of my cells in the ediit
item template. Now i need to enable/disable a
textbox in another boundcolumn.

the problem i am facing is the checkchanged event is not raised or for some reason, the control does not enter the function. I have made the function as protected and
specified the function name in the html for the checkbox but i still do not get an event.

is this possible, what is wrong here

fred

.

Nov 18 '05 #4

Eliyahu,

I seem to abe able to get an event on the checkbox when
I set AutoPostBack to true and I can have the logic for
enable/disable in the event.
Fred
-----Original Message-----
Do you mean you have a checkbox in one column and want to enable/disable atextbox in another? If it's the case, I recommend doing it on client sidewith a javascript function. Add a client-side onclick event to the checkbox.In the event handler function find and enable/disable the textbox. This isthe fastest solution, no round trips involved. There is a number of thingsyou have to know though. To add a client-side event handler use Attributesproperties of the checkbox. Do it for every data row in the grid'sItemDataBoun d event handler. Good luck.

Eliyahu

"fred" <an*******@disc ussions.microso ft.com> wrote in messagenews:25******* *************** *******@phx.gbl ...

eliyahu,

How can i enable/disable the textbox in my boundcolumn
from a control in another column

thanks for your help

>-----Original Message-----
>Checkchanged event doesn't cause postback, it is raised
if the checkbox
>value changed between postbacks.
>
>Eliyahu
>
>"fred" <an*******@disc ussions.microso ft.com> wrote in

message
>news:25******* *************** *******@phx.gbl ...
>> hiya,
>>
>> I have got a checkbox in one of my cells in the
ediit >> item template. Now i need to enable/disable a
>> textbox in another boundcolumn.
>>
>> the problem i am facing is the checkchanged event

is not
>> raised or for some reason, the control does not
enter the
>> function. I have made the function as protected and
>> specified the function name in the html for the

checkbox
>> but i still do not get an event.
>>
>> is this possible, what is wrong here
>>
>> fred
>
>
>.
>

.

Nov 18 '05 #5
Fred,

That is fine for the quick start. My experience with ASP.NET also started
from 99% of code on the server side. Now the percentage is much less because
of dramatic performance improve that you gain by eliminating unnecessary
round trips.

Eliyahu

"Fred" <an*******@disc ussions.microso ft.com> wrote in message
news:26******** *************** ******@phx.gbl. ..

Eliyahu,

I seem to abe able to get an event on the checkbox when
I set AutoPostBack to true and I can have the logic for
enable/disable in the event.
Fred
-----Original Message-----
Do you mean you have a checkbox in one column and want

to enable/disable a
textbox in another? If it's the case, I recommend doing

it on client side
with a javascript function. Add a client-side onclick

event to the checkbox.
In the event handler function find and enable/disable

the textbox. This is
the fastest solution, no round trips involved. There is

a number of things
you have to know though. To add a client-side event

handler use Attributes
properties of the checkbox. Do it for every data row in

the grid's
ItemDataBoun d event handler. Good luck.

Eliyahu

"fred" <an*******@disc ussions.microso ft.com> wrote in

message
news:25******* *************** *******@phx.gbl ...

eliyahu,

How can i enable/disable the textbox in my boundcolumn
from a control in another column

thanks for your help


>-----Original Message-----
>Checkchanged event doesn't cause postback, it is raised if the checkbox
>value changed between postbacks.
>
>Eliyahu
>
>"fred" <an*******@disc ussions.microso ft.com> wrote in
message
>news:25******* *************** *******@phx.gbl ...
>> hiya,
>>
>> I have got a checkbox in one of my cells in the ediit >> item template. Now i need to enable/disable a
>> textbox in another boundcolumn.
>>
>> the problem i am facing is the checkchanged event is not
>> raised or for some reason, the control does not enter the
>> function. I have made the function as protected and
>> specified the function name in the html for the
checkbox
>> but i still do not get an event.
>>
>> is this possible, what is wrong here
>>
>> fred
>
>
>.
>

.

Nov 18 '05 #6

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

Similar topics

0
1033
by: Stephen | last post by:
Does anyone know how to write code which displays the contents of a row in a datagrid, into a label outside of the datagrid. I want this to happen when a checkbox in a datagrid is checked. My datagrid is as follows: - <asp:DataGrid id="DataGrid1" runat="server" Width="100%" AutoGenerateColumns="False"> <HeaderStyle Height="20px" Font-Bold="False" BackColor="#666699" ForeColor="#ffffff"></HeaderStyle>
4
1515
by: Jim Heavey | last post by:
Hello, I am starting to learn how to use the Datagrid and I have a couple of questions. My datagrid as a checkbox in it. It looks like the following in the datagrid... <asp:TemplateColumn HeaderText="Check In"> <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle> <ItemTemplate> <asp:CheckBox id="chkReturn" runat="server" OnCheckedChanged="CheckItIn"></asp:CheckBox>
7
2275
by: Lars Netzel | last post by:
If I put a checkbox in a datagrid (ASP.NET) and set the Autopostback to true I can catch OnChange event on checkbox but how do I then catch what DataGridItemIndex is? Can I use some Event in the Datagrid that will fire off when the Checkbox is changed? regards /Lars
2
1296
by: Luis Esteban Valencia | last post by:
I have a data grid control with a templated checkbox column residing in a asp.net user control. The checkbox boolean state determines if the item is later added or removed from another database table. The checkbox column is not part of the db schema, but is added at run time and initialized separately before binding the data table to the grid. A batch update is processed via a server side method invoked from a submit button outside the...
2
3679
by: Luis Esteban Valencia Muñoz | last post by:
I have a datagrid that displays editable text fields (2 different price fields) and a checkbox in every row. It has a "SaveChanges" button at the bottom, which, when pressed, looks at every checkbox in the datagrid, if it is checked, it updates the corresponding rows prices. That works, no problem. What I need to do is that when a user clicks into either of the price text fields, the checkbox automatically checks itself. This will save...
3
3456
by: danc | last post by:
I have a datagrid with a checkbox and dropdown list in each row. Both set AutoPostBack to true and ItemCommand and OnSelectedIndexChanged events for these controls works fine when DataGrid is not paged. As soon as I turn on paging support, I no longer get events properly for any page except the first. 1) The DataGrid displays the page numbers on the top (and bottom). Whenever I click to go to a specific page number, the DropDownList's...
17
7427
by: Mike Fellows | last post by:
im trying (unsucessfully) to add a checkbox column to my datagrid i basically have a datagrid that im populating from a dataset Me.DataGrid1.DataSource = ds.Tables(0) the datagrid then has 5 columns in it but i need to add a sixth column which will be my checkbox column - any help or pointers with this would be great
3
3146
by: Fao, Sean | last post by:
I have a DataGrid that I'm adding CheckBox controls to at runtime (in the code behind) and I'm not sure if I'm doing it correctly. First of all, I noticed that the MyDataGrid.Columns.Add() method expects a DataGridColumn so I instantiated an object of type TemplateColumn that I had hoped I could add a CheckBox to. I soon discovered that the ItemTemplate property of the TemplateColumn class returned an object that had implemented the...
2
1679
by: glenn | last post by:
Hi folks, Apparently, when you have a child control inside of a DataGrid, the event handler for the control does not work. I want to put a child control (checkbox, dropdownlist, etc.) into my datagrid and have the value selected to immediately fire an event and immediately update my database. For example, if a checkbox is checked (in a DataGrid there would be a checkbox column with a checkbox in each row), an event would be fired to...
1
1330
by: arun.hallan | last post by:
Hi, I have two columns in a datagrid that are filled with checkboxes. I want one checkbox in a row to be checked when the corresponding checkbox is checked. I've added an OnCheckedChanged event to the checkbox and implemented the method with the following code:
0
8680
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, 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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8899
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
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 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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
3
2007
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.