473,287 Members | 3,228 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,287 software developers and data experts.

Creating a Select/Deselect all checkbox in a datagrid

I run a search on my database and get items that fit that search in a
datagrid. There are checkboxes already for each item. I need to
create a select/deselect all checkbox at the top of the column and be
able to select.deselect all items that I have found. I am using C#.Net

Thanks in advance for this

Nov 30 '06 #1
1 6784
something like this.

foreach ( DataGridItem item in DataGrid1.Items )
{
CheckBox _Box = item.FindControl("myCheck");
_Box.Checked = true;
}
---
Posted via DotNetSlackers.com
Dec 1 '06 #2

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

Similar topics

0
by: Erik | last post by:
I'm trying to create a asp.net webform with a datagrid which has been filled with data from a database. The datagrid is filled allright but I would like to add a checkbox at every row which the use...
4
by: Michael Champagne | last post by:
We have an application to where you can select/deselect all checkboxes in a checkbox array by clicking a 'master' checkbox at the top of the screen. This seems to work fine unless there is only...
5
by: _andrea.l | last post by:
I have n checkboxes and 1 checkbox 'SELECT ALL'. for example: <form action="" method="get"> <input name="sa" type="checkbox" value="v"> select all <input name="c1" type="checkbox" value="v">...
6
by: GSteven | last post by:
(as formerly posted to microsoft.public.access.forms with no result) I've created a continuous form which is based on a straightforward table (ex - customers - 100 records). On the form there is...
1
by: Dale | last post by:
Does anyone know how to select all of the items in a datagrid and then how to deselect all items in a datagrid. Thanks in advance! Dale
9
by: hazz | last post by:
I want to display 'n' records for a table-driven data entry page. The first column should be readonly and the 2nd column, a checkbox WRITABLE (NOT READONLY). I can't use the gridview because it...
0
by: slemen | last post by:
Hi, The DataGrid aps:EditCommandColumn when used with column templates created programmatically does not trigger the _Edit subroutine in code. The ASP:Datagrid definition is below (1), the...
4
by: 159789 | last post by:
Hi, I am new to javascript. I want to select all the checkboxes or deselect all in a form, based on the state of one checkbox. Here is the code: <html> <script language="JavaScript">...
3
by: geetung | last post by:
Hi guys, I'm having some trouble writing code for this purpose of select/deselect all function. I do not want to use the form "name" because i want ensure that it is html strict. Also my form...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
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:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
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: 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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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.