2009-05-26 12 views

उत्तर

21

ItemCheck घटना शुरू हो रहा है जब एक आइटम बदलने के लिए, आप पुराने और नए मूल्य की जांच करने के लिए अनुमति देता है, और (EventArgs की NEWVALUE संपत्ति बताए द्वारा परिवर्तन रद्द करने के लिए यदि आप चाहते हैं के बारे में है की जाँच की राज्य पैरामीटर)। चेक (या अनचेक) पूरा होने के बाद ट्रिगर किया गया है

कोड का नमूना:

private void ListView_ItemCheck(object sender, ItemCheckEventArgs e) 
{ 
    // the checked state of an item is about to change 
    if (e.NewValue == CheckState.Checked) 
    { 
     // perform some check if this is allowed, and if not... 
     e.NewValue = e.CurrentValue; 
    } 
} 

private void ListView_ItemChecked(object sender, ItemCheckedEventArgs e) 
{ 
    // the checked state of an item has changed 
} 
संबंधित मुद्दे