PC Review


Reply
Thread Tools Rate Thread

Datagrid w/ checkbox: Check All?

 
 
Brian
Guest
Posts: n/a
 
      2nd Oct 2003
I've got a datagrid with a checkbox column. Everything looks good.
I'd like to implement a chcekbox that when checked causes all the
checkboxes in the grid to become checked, and vice versa. Any ideas
on how to do this?

The following code does not work:

Dim iRow As Integer
Dim myView As DataView

myView = grdPersonSearchResults.DataSource
For iRow = 0 To myView.Table.Rows.Count - 1
If grdPersonSearchResults(iRow, 0) Then
grdPersonSearchResults(iRow, 0) = Me.chkCheckAll.Checked
End If
Next iRow

Where column 0 is the checkbox row.

Thanks,
Brian
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clicking Anywhere in DataGrid Row to Check CheckBox .NETn00b Microsoft ASP .NET 1 28th Nov 2005 08:08 AM
How can I check a checkbox selected more than one times in DataGrid ???? Alex Smith Microsoft ADO .NET 2 10th Jun 2005 08:32 AM
how to check/uncheck the checkbox in datagrid =?Utf-8?B?UmVraGE=?= Microsoft Dot NET Framework Forms 4 2nd Dec 2004 04:54 PM
how to check/Uncheck a checkbox dynamically in a datagrid in asp.n =?Utf-8?B?U2lsZWVzaA==?= Microsoft ASP .NET 4 2nd Dec 2004 03:25 PM
how to check/uncheck the checkbox in datagrid =?Utf-8?B?UmVraGE=?= Microsoft ASP .NET 2 2nd Dec 2004 03:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:42 AM.