We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ListView after ItemCheck

Thread ID:

Created:

Updated:

Platform:

Replies:

4965 Jun 11,2003 05:23 AM UTC Feb 4,2004 11:36 AM UTC WinForms 1
loading
Tags: FAQ
Ian Yelland
Asked On June 11, 2003 05:23 AM UTC

Hi, I am using the ListView with check boxes and wish to change the state of a button depending on whether there are any items checked in list or not. I have tried evaluating the ListView.CheckedItems.Count value in the ItemCheck event but unfortunatley the value is not updated at this point, and there is not an AfterItemChecked event. Does anyone know how I can evaluate this immediately an item is checked or unchecked ?

Emma
Replied On February 4, 2004 11:36 AM UTC

> Hi, > > I am using the ListView with check boxes and wish to change the state of a button depending on whether there are any items checked in list or not. I have tried evaluating the ListView.CheckedItems.Count value in the ItemCheck event but unfortunatley the value is not updated at this point, and there is not an AfterItemChecked event. Does anyone know how I can evaluate this immediately an item is checked or unchecked ? > Hi Ian ItemCheck is fired for each item, even in a multiselection, which for you purposes is quite handy. The eventargs gives you NewValue, which will be true id the item is in the prcess of being checked. So if you take ListView.CheckedItems.Count+1, that will give you an accurate value. Hope this helps! Cheers Em

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;