Thursday, January 21, 2016
listview items can not be achieved check? (anxious)
Will listview individual item can achieve a check?
For example, there is a check box in front of each item.
I do not know how to achieve?
Thank you.
Reply:
I found a method, the checkboxes can be selected to be true.
But I do not know how the selected items are read out.
Sample on the listbox not use msdn, mobile related properties does not seem to realize.
ListView.CheckedListViewItemCollection checkedItems =
m_lstContacts.CheckedItems;
Tip does not exist, then system.windows.forms.listview CheckedListViewItemCollection, CheckedItems.
Reply:
Does anybody know?
Reply:
Set listview attributes (style), the bit is set checkbox can appear a checkbox
Reply:
What I mean is the need to read out the selected records.
How to know whether an item is selected.
Reply:
Comparison own traversal state list
int item_count = m_ListView.GetItemCount ();
int select_count = m_ListView.GetSelectedCount ();
if (select_count & gt; 0)
{
for (int index = 0; index & lt; item_count; index ++)
{
if (m_ListView.GetCheckState (index))
{
Reply:
It can also be loaded into a Check button
first item in the ListViewBut a little to trouble spots!
ListView with editing functions to achieve almost!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment