473,385 Members | 1,409 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,385 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 1988
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.