[英]Why I can't see any log entry but still can see the changes in live metrics in Application Insights?
[英]ListView - Why can't I see any selected items?
當用戶在ListView中選擇項目時,我嘗試做些事情。 我已經試過這段代碼:
private void listView1_SelectedIndexChanged(object sender, EventArgs e) { q = listView1.SelectedItems[0].Index; }
但它不起作用,並引發一個異常,說“ listView1.SelectedItems”的計數為0。
為什么不起作用?
始終檢查listview項目計數。 如果項目為空,則將出現異常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.