Responder
Llenar un checkboxlist al editar un registro dentro de un radgrid, y que todos esten selected=True
Tengo un radgrid y en la forma de edición tengo un control checkboxlist que se conecta a una base de datos y le digo el campo para texto y para value.
Pero no me aparece activada el check para cada item.
Dentro del ItemCommand del Radgrid tengo:
Dim item As Telerik.WebControls.GridDataItem = DirectCast(e.Item, Telerik.WebControls.GridDataItem)
Dim chkbxlst As CheckBoxList = DirectCast(item("Check1").FindControl("Chk"), CheckBoxList)
Dim i As Integer
For i = 0 To chkbxlst.Items.Count - 1
chkbxlst.Items(i).Selected = True
Next
Pero no me aparece activada el check para cada item.
Dentro del ItemCommand del Radgrid tengo:
Dim item As Telerik.WebControls.GridDataItem = DirectCast(e.Item, Telerik.WebControls.GridDataItem)
Dim chkbxlst As CheckBoxList = DirectCast(item("Check1").FindControl("Chk"), CheckBoxList)
Dim i As Integer
For i = 0 To chkbxlst.Items.Count - 1
chkbxlst.Items(i).Selected = True
Next