|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Checkbox list questionsHi
I am new to vs2005 and have two questions re: chekbox list. 1. How can I check in code what item was clicked? 2. How can I access an item's value in code? Thanks Regards 1. ItemCheck event is fired whenever an item is checked/unchecked. The event
arguments carry information regarding the index of the checked item and the new value and old state 2. As for the items in the list box there are several properties that can be used: - Items - collection of items that can be accessed by index - SelectedIndex / SelectedIndices - gets the index of the selected element or elements in case of multiselection. This index can be used with the Items collection to get the selected tem - SelectedItem / SelectedItems - gets the selected item (no need of using the Items collection) - There aslo collections regarding checked elements only: CheckedIndex(ces) and CheckedItem(s). -- Show quoteHide quoteHTH Stoitcho Goutsev (100) "John" <John@nospam.infovis.co.uk> wrote in message news:uBEURWtxGHA.3604@TK2MSFTNGP04.phx.gbl... > Hi > > I am new to vs2005 and have two questions re: chekbox list. > > 1. How can I check in code what item was clicked? > > 2. How can I access an item's value in code? > > Thanks > > Regards > > >
Codesmith vs. Hand coding
Search DataRow Array Converting VB6 Structures to .NET Problem using default xml namespace and selectsignlenode/selectnod Reading specified format text from text file IE clone. Any good pointer ? Currency issue Setup Project (Just me - Everyone) not null statement Storing Integer array in DB |
|||||||||||||||||||||||