Ok, this has been bugging me for a while now. And I wonder how others handle the following case:
The DataContext object's code:
public ObservableCollection…
How do I use the Datagrid.SelectedItem to select a row programmatically?
Do I first have to create a IEnumerable of DataGridRow objects and pass the matching row to this SelectedItem property or how do I do it?
EDIT:
I need to match the cell content…
I have a ComboBox that has the SelectedItem bound to the ViewModel.
When the user selects a new Item in the View ComboBox, I want to display a prompt and…
I'm unable to figure out how to select an item programmatically in a ListView.
I'm attempting to use the listview's ItemContainerGenerator, but it just doesn't seem to work. For example, obj is null after the following operation:
//VariableList is…
So someone suggested using a WPF TreeView, and I thought: "Yeah, that seems like the right approach." Now, hours and hours later, I simply can't believe how difficult it has been to use this control. Through a bunch of research, I was able to get…
How to get selected option using Selenium WebDriver with Python:
Someone have a solution for a getFirstSelectedOption?
I'm using this to get the select element:
try:
FCSelect = driver.find_element_by_id('FCenter')
self.TestEventLog =…
ok, I must be having a brain freeze here...
I have a ComboBox with 6 items and I'm trying to bind the selected item to an integer value. Its not working, I suspect its because the ComboBoxItem's are strings. I don't feel like making a list in code…
I created a ListBox that has a DataTemplate as Itemtemplate. However, is there an easy way to access the generated UIElement instead of the SelectedItem in codebehind?
When I access SelectedItem, I just get the selected object from my
ItemsSource…
I've hooked up a ComboBox's SelectedItemChangeEvent to a ICommand in my view model. Everything seems to be working fine however I do not know how to get the SelectedItem of the ComboxBox. I think I need to use the CommandParameter of the…
I have been confused while setting SelectedItem programmaticaly in wpf applications with Net Framework 3.5 sp1 installed. I have carefully read about hundred posts \topics but still confused((
My xaml:
…
I have a ComboBox that has its ItemsSource bound to a static List of options. The ComboBox is part of a form which is bound to a CustomObject class, and one of the properties on that class is a CustomSettingProperty.
I would like to…
I have a Listview that has a checkbox as one of the columns. If I click anywhere but the actual checkbox the SelectedItem of the ListView is set to the current selected row, as expected. If, on the other hand I click onto the checkbox (without…
I am using a ComboBox in my WPF application and following MVVM. There is a list of strings which I want to show in my ComboBox.
XAML:
View Model:
public…