Questions tagged [selecteditemchanged]
28 questions
4
votes
1 answer
C# Windows Forms ComboBox's SelectionChangeCommitted event prevents selection change when Combobox's BindingSource property changed in it
Using C# Entity Framework objects like below 2
item:
itemname
itemtypeid
itemprice
itemsize
itemtype:
typeid
typename
currentprice
typesize
On item edit form there is a combobox called typeidComboBox bound to item.itemtypeid and item list…

Namchin
- 61
- 4
3
votes
1 answer
WPF distinguish between coding-SelectionChanged and the mouse-SelectionChanged
I have a machiavellian question (for me).
In my WPF application I have a ListBox that has in the ItemTemplate a Combobox. When the user select a ComboBoxItem, I have to do some complex operations on the ObservableCollection that is the ItemsSource…

lamarmora
- 1,116
- 4
- 16
- 32
3
votes
1 answer
Preventing WPF TreeView's SelectedItemChanged event from bubbling
I have a WPF TreeView which triggers a SelectedItemChanged event. Whenever I select an item in the TreeView, the SelectedItemChanged event is triggered for the selected item and all of the selected node's ancestors in the tree.
How do I prevent the…

sourcenouveau
- 29,356
- 35
- 146
- 243
2
votes
1 answer
WPF TreeView Cancel TreeViewItem Selection
I've been looking for a solution to this problem but I still can't find an adequate solution yet. Please help. Basically, I have a treeview that's bound to a list of objects. When the user clicks on a treeviewitem, I load data for a data grid…

Minh Nguyen
- 76
- 2
2
votes
4 answers
C# ListView - Detecting when the user deselects an item or select a new one
I'm trying to detect when the user selects a new item in a ListView and when he deselects everything (by clicking on an empty area on the ListView), but I'm having a hard time getting it right. I need this to enable or disable a couple of "Move item…

Fergo
- 57
- 7
2
votes
1 answer
How to bind to SelectedItem property of WPF TreeView?
I have adapted the TreeView Control sample project here for use with Entity Framework objects. It works beautifully, but like many others attempting to update collections or properties on their ParentViewModels based SelectedItem changes, I too am…

Rachael
- 1,965
- 4
- 29
- 55
2
votes
1 answer
TreeView auto-selecting parent after user selects child
In my window I have a TreeView and TextBox. Pretend the TextBox is used for writing a custom script and the TreeView is a way to select a function to insert; think Crystal Report script editor.
My goal is for a user to click one of the children of…

Josh
- 2,955
- 1
- 19
- 28
1
vote
2 answers
SelectedItemChanged Event bind to an ObservableCollection>
Here is the ObservableCOllection that it the "ItemSource" of my TreeView :
ObservableCollection>
The thing is that I am now writing the SelectedItemChanged Event and I got the following problem. AS far as I tried, I CAN NOT…

Guillaume Slashy
- 3,554
- 8
- 43
- 68
1
vote
1 answer
ListView reloading error if one of the records is selected priorly
I have a ListView that pulls data from a database via class.
I also use listView_SelectionChanged to track the name of selected product.
public void listView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var selected =…

positive perspective
- 339
- 1
- 3
- 18
1
vote
2 answers
Removing a JavaFX TreeItem Sometimes Changes TreeTableView Selection
I have a JavaFX TreeTableView. Under its root, there is a set of TreeItem (nodes) and each node may have its own child TreeItem (sub-nodes). Since there is no information to show for any nodes without sub-nodes, I want to remove those. But…

Guangliang
- 228
- 2
- 10
1
vote
0 answers
java binding choice box selected item property to a simple double property
I have double values inside of choice box, but how do I bind a choice box selected item property to a double property? The code below won't disable the button, as desired. It seems to me that it's because the selectedItemProperty is not an…

Maroon66
- 41
- 3
1
vote
1 answer
ListView SelectionChanged won't update when enclosed TextBox clicked
I have a list view with a gridview. The gridview second column contains textboxes (and in case this is relevant to this particular problem, the textboxes are rendered by a datatemplate).
I want the listview SelectedItem to update when the user…

Coder2013333
- 139
- 1
- 9
1
vote
3 answers
c#, listbox, stackOverflow exception
I inherited KryptonToolkit ListBox control to get SelectedItemChanging event.
public class CPListBox : KryptonListBox
{
public event CancelEventHandler SelectedIndexChanging;
protected virtual void…

Adrian Serafin
- 7,665
- 5
- 46
- 67
1
vote
1 answer
How to bind a Command to SelectedItemChanged event of a TreeView
There is a Treeview Control.
Is…

user1874589
- 117
- 1
- 2
- 9
1
vote
0 answers
Treeview selected item changes to root item on service call
I have a TreeView in a window that is being opened as a dialog. When an item is clicked on it gets selected and. But when there is a service call the selected item changes to the root item. The DataContext for the TreeView is an array of "authors",…

user1558432
- 31
- 1