B
bdwgarth
I am working with a DataList which consists of dynamically changing
number of rows and static number of columns. There are twelve columns
and each is a singe CheckBox representing a Yes or No value(checked or
not checked). I have a 'Check All' button (using OnItemCommand) for
each row that needs check all of the CheckBoxes in that row so the user
dont have to take the time. I can get the row index but how do I go
about setting the boxes to checked only for this row. I have something
like this:
----------------------------------
Dim dl2item As DataListItem
Dim cb1 As CheckBox
Dim cb2 As CheckBox
Dim cb3 As CheckBox
............
Dim cb12 As CheckBox
** Dont know This Part **
** For this row E.Item.ItemIndex I want all boxes checked**
cb1 = CType(dl2item.FindControl("CheckBox1"), CheckBox)
cb2 = CType(dl2item.FindControl("CheckBox2"), CheckBox)
cb3 = CType(dl2item.FindControl("CheckBox3"), CheckBox)
.............
cb12 = CType(dl2item.FindControl("CheckBox12"), CheckBox)
cb1.Checked = True
cb2.Checked = True
cb3.Checked = True
.............
cb12.Checked = True
number of rows and static number of columns. There are twelve columns
and each is a singe CheckBox representing a Yes or No value(checked or
not checked). I have a 'Check All' button (using OnItemCommand) for
each row that needs check all of the CheckBoxes in that row so the user
dont have to take the time. I can get the row index but how do I go
about setting the boxes to checked only for this row. I have something
like this:
----------------------------------
Dim dl2item As DataListItem
Dim cb1 As CheckBox
Dim cb2 As CheckBox
Dim cb3 As CheckBox
............
Dim cb12 As CheckBox
** Dont know This Part **
** For this row E.Item.ItemIndex I want all boxes checked**
cb1 = CType(dl2item.FindControl("CheckBox1"), CheckBox)
cb2 = CType(dl2item.FindControl("CheckBox2"), CheckBox)
cb3 = CType(dl2item.FindControl("CheckBox3"), CheckBox)
.............
cb12 = CType(dl2item.FindControl("CheckBox12"), CheckBox)
cb1.Checked = True
cb2.Checked = True
cb3.Checked = True
.............
cb12.Checked = True