Click to See Complete Forum and Search --> : [RESOLVED] CheckboxList Eval if Count-1 or Count-2 are Checked


Alphadan
March 31st, 2009, 03:33 PM
Hi all


this its a very silly problem i have with CheckBoxList control, i dont know if its just me or what but the whole idea of the control its just great but the implementation its very confusing.

im trying to eval something like this

if CheckBoxList.Items.Item(CheckBoxList.Items.Count-1).Checked=true then.....
or something like
CheckBoxList.CheckedItems.Item(CheckBoxList.Items.Count-1) = Checked then...


the problem its that i dont know how does the checkboxlist works but it just sucks that they had to make it so confuising....

i've handled lots and lots of collection controls and they all work in a similar and simple way but this its just confusing.

Alphadan
March 31st, 2009, 03:51 PM
Excuse my stupidity it was simople but i was stuk in this since yesterday night...

i was looking for a property, but its a methood which does what i needed.

this its a example

MsgBox(ChecboxList1.GetItemChecked(ChecboxList1.Items.Count - 1))

GetItemChecked < this its the methood i needed.

dglienna
March 31st, 2009, 06:28 PM
When you press the '.' key, the available options should jump up.

I think you need the CLICK event.

http://www.startvbdotnet.com/controls/checkbox.aspx