Protected Sub CheckBoxList1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxList1.DataBound For i As Integer = 0 To CheckBoxList1.Items.Count - 1 CheckBoxList1.Items(i).Selected = CType(CheckBoxList1.DataSource, IQueryable(Of Permission)).ToList.Item(i).HasAccess Next End Sub
protected void CheckBoxList1_DataBound(object sender, System.EventArgs e) { for (int i = 0; i <= CheckBoxList1.Items.Count - 1; i++) { CheckBoxList1.Items(i).Selected = ((IQueryable<Permission>)CheckBoxList1.DataSource).ToList.Item(i).HasAccess; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)