473,288 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

Raising an handling and event on a checkbox in a gridview...

Hi,

I have a checkbox in a gridview template column with autopostback turned on.
I want to be able to handle this event but am unsure how. With other control
of this nature I have used CommandName and CommandArgument - but these are
not available on checkboxes.

Also, the checkbox does not raise the RowCommand event to catch it there.

I cannot use the CheckboxField as the I am binding to a column which has to
set 4 states:

-1 = Not visible
0 = Enabled & unchecked
50 = Enabled & checked
100 = Disabled & checked

Any ideas how best to achieve this?

Thanks in advance,

Stu
May 17 '06 #1
1 1984
Hi Stu,

I got your problem, as you already know the values, why cant you use the
Java script to assign the values. by this you can assign the values to the
checkbox and then post them when you are sending the infromation to DB or . .
.. . .
if you still want the information please update me.
--
Raghuram Raichooti
"Stu Lock" wrote:
Hi,

I have a checkbox in a gridview template column with autopostback turned on.
I want to be able to handle this event but am unsure how. With other control
of this nature I have used CommandName and CommandArgument - but these are
not available on checkboxes.

Also, the checkbox does not raise the RowCommand event to catch it there.

I cannot use the CheckboxField as the I am binding to a column which has to
set 4 states:

-1 = Not visible
0 = Enabled & unchecked
50 = Enabled & checked
100 = Disabled & checked

Any ideas how best to achieve this?

Thanks in advance,

Stu

May 17 '06 #2

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

Similar topics

4
by: rawCoder | last post by:
Hi all, How Can You Raise Events Asynchronously ? Now for the details ... I want to do inter modular communication using events in such a way that the contributing modules need not...
2
by: Sheldon Penner | last post by:
My ASP.Net 2.0 application uses a GridView control containing a template consisting of a checkbox and a Text property that I use to store a value to pass to a SQL statement in the OnCheckChanged...
3
by: Woo Mun Foong | last post by:
I have a checkbox, when enable, allows me to proceed with what I like to do. However, I need to check a certain conditions before I allow the checked box to be checked, if condition is not fullfill...
6
by: hazz | last post by:
ICollection CreateDataSource() { dt.Columns.Add(new DataColumn("ReportInclude", typeof(Boolean))); for (int i=0; i<=10; i++) { dr = dt.NewRow(); dr = 0; dt.Rows.Add(dr); } void...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
1
by: Nam | last post by:
I have a DropDownList control in a TemplateField inside my GridView How do I access this control’s SelectedIndexChanged event in codeBehind page? I don’t see the ID “DropDownList1” of...
2
by: RSH | last post by:
Hi, I have been trying to follow a tutorial on raising an event from a user control and then handling it in the parent page. The article is a little vague so I believe I have the code in...
6
by: thanigaimani83 | last post by:
Hi guys. i can explain for my doubt with example.see.my table have multiple type of employee details like as Mangemment,Programmer,Designers,Accountants,ContractEmployees.Each type of department...
1
by: Danielle | last post by:
Greetings all and thanks in advance for any help you can provide. I am trying ultimately to get values from a gridview row when a checkbox on the row is checked. the problem I'm having is that...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.