I'm struggling with the following and would appreciate some help:
I have a number of items in a listview, some of which may be in a readonly state. When in readonly state, the items are disabled. However, I need the user to be able to remove them by clicking a button which is displayed using a celltemplate on a gridviewcolumn.
By default this is disabled by default and setting IsEnabled="true" on the item itself does not enable it regardless of the state of the container.
I'd also like the user to be able to select the item to remove it in a multiselect mode. However selection is also disabled by default. What is the best way to achieve both ways of removing the item?
The item is disabled inside a user control using the following:
ListBoxItem listBoxItem = (Item is int) ? GetListBoxItemFromIndex((int)Item) : GetListBoxItemFromItem(Item);
if (listBoxItem != null)
listBoxItem.IsEnabled = Enable;