The below code is not working:
UltraListView lv = new UltraListView();
private void RunSample2() { lv.View = UltraListViewStyle.List; lv.Dock = DockStyle.Fill; lv.ViewSettingsList.ImageSize = new Size(0,0); lv.ItemActivated += new ItemActivatedEventHandler(lv_ItemActivated); for (int i = 0; i < 10; i++) { UltraListViewItem item = new UltraListViewItem("Test " + i, new string[] { "Test " + i }); lv.Items.Add(item); } pMain.Controls.Add(lv); } void lv_ItemActivated(object sender, ItemActivatedEventArgs e) { //MessageBox.Show("Item Activated: " + e.Item.Text); lv.ActiveItem = null; }
The selection is always active and I cannot deselect it. It is always highlighted in blue.
Selected and active are not the same thing. If you want to clear item selection, clear the SelectedItems collection.
Hmm, had tried that before but must have done something amiss. My guess is that the event trigger was off on where i placed the code before. Regardless, it now works in my project so I am good to go.
Thanks,
Alan
Hello Alan,
Thank you for your feedback.
Please let us know if you have any other questions.