How to select all or deselect all checkboxes in datagrid...

A

Al Knowles

This does not work....

Sub SetCheckBoxValues(ByVal ab_on_off As Boolean)

Dim ditem As DataGridItem
Dim ckbx As CheckBox

For Each ditem In DataGrid1.Items
ckbx = CType(ditem.Cells(0).Controls(1), CheckBox)
If ab_on_off Then
ckbx.Checked = True
Else
ckbx.Checked = False
End If

ditem.Cells(0).Controls(1) = ckbx
Next


End Sub

...because property "item" is read-only.

Is there a way to accomplish my objective without javascript? (Only
because I don't know my way around in javascript! But I'll accept
javascript examples if that's all there is...)

Please advise.

Suggestions appreciated. Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top