473,545 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid and embeded Checkbox..How to find if checkbox clicked

Hi,

I have a datagrid.

<asp:DataGrid id="DataGrid1" runat="server" Height="237px" Width="280px"
AutoGenerateCol umns="False" AlternatingItem Style-BackColor="#e9e 9e9"
ShowHeader="fal se" ShowFooter="fal se" >
<Columns>
<asp:TemplateCo lumn HeaderStyle-Height="0">
<ItemTemplate >
<asp:CheckBox id="CheckBox1" AutoPostBack=Tr ue
Text="<%# Container.DataI tem %>" runat="server">
</asp:CheckBox> </ItemTemplate> </asp:TemplateCol umn>
</Columns>
</asp:DataGrid>
How can I find out if CheckBox1 is clicked?

Oct 6 '06 #1
1 1338
Check out this code sample at http://aspnet101.com:
http://aspnet101.com/aspnet101/aspne...de=chkDataGrid

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"DotNetDev" <Do*******@disc ussions.microso ft.comwrote in message
news:00******** *************** ***********@mic rosoft.com...
Hi,

I have a datagrid.

<asp:DataGrid id="DataGrid1" runat="server" Height="237px" Width="280px"
AutoGenerateCol umns="False" AlternatingItem Style-BackColor="#e9e 9e9"
ShowHeader="fal se" ShowFooter="fal se" >
<Columns>
<asp:TemplateCo lumn HeaderStyle-Height="0">
<ItemTemplate >
<asp:CheckBox id="CheckBox1" AutoPostBack=Tr ue
Text="<%# Container.DataI tem %>" runat="server">
</asp:CheckBox</ItemTemplate</asp:TemplateCol umn>
</Columns>
</asp:DataGrid>
How can I find out if CheckBox1 is clicked?

Oct 6 '06 #2

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

Similar topics

0
2147
by: Just D | last post by:
Hi All, Does anybody know how to write the following code? I have a database table with a few columns including: ID , "Task" , ForceRun . I need to show the DataGrid on the ASPX page with these selected fields and allow user to click one or more CheckBox controls to activate this bit on the database table for a required ID. I have...
9
1255
by: Arjen | last post by:
Hello, I'm using a datagrid for a news module. The datagrid only displays the news title, date and header. (this is allready working) Now I want to make the title clickable... if you click on it you will see the complete news message. When you see the complete news message you don't see the datagrid anymore. In the news message you can...
2
11601
by: Niclas Lindblom | last post by:
Hi, I have a datagrid with linkbuttons. I would like to catch the click event when a link button has been clicked and use the string from the text value of the link button in a clientside Java script. Is this possible or should I look for other ways of achieving this ? Regards Niclas
4
1839
by: Mike | last post by:
Hi, Is there a possibility to have one of the Web Control Datagrid's column as a Calendar when editing data? Any resources on this subject? Thanks Mike
1
1964
by: Wolffang | last post by:
From: "Wolffang" <javid@techlite.co.uk> Subject: How to do a multiple select and update in a datagrid Date: 23 October 2004 21:28 Using Visual studio.net VB I have a datagrid that brings records from a stored procedure. Be selecting multiple datarows using a checkbox. All i want to do is update a field called 'Active' datatype bit from...
10
2404
by: Jennyfer J Barco | last post by:
Hello, I have a datagrid that brings some information from a query. I need to have a checkbox in each row so the user can select the rows he wants to reprint. Is it possible to have a checkbox control in a datagrid? Now I have a Select column but the problem is that the user needs to select more than one record and send them all to print,...
1
942
by: Jim Heavey | last post by:
If I have a datagrid in which I have placed a "Check box" in one of the columns and then I have a button (outside of the grid) when the user presses, I want to do something with each line in the grid in which the user has clicked the check box. How do I iterate through the datagrid and find my check box control so that I can test the values...
1
4218
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get the example to work. I created the following two classes, provided with the example: *-*-**-*-*-*-*-*-*-*-*-*-**-*-*-*-*-CheckBoxColumn...
4
7486
by: mamun | last post by:
Hi All, I have the following situation and am looking for answer in C#. I have a datagrid and putting checkbox next to each record. In the header I have a Delete button. I want users to checkchekboxes and click the Delete button. That will show a confirmation dialog message with the items they choose to delete.
0
7470
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...
0
7405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7659
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7811
jinu1996
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...
1
7428
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...
0
7760
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...
1
5334
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...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
709
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...

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.