Questions tagged [itemssource]

374 questions
0
votes
1 answer

Update ListView's ItemsSource Constantly?

I have a ListView that I set it's ItemsSource to list all the Assignments (a table in my SQL Database, ORM is LINQ to SQL) like so: ltvAssignments.ItemsSource = _repo.ListAssignments(); (This bit of code is exactly after InitializeCompenent() is…
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
0
votes
2 answers

WPF: Binding DataGrid to collection programmatically

I already spent hours on this, and similar topics did not help. :( I've got an object of type "Chart" which contains a List "LineItems". I want to bind LineItems programmatically to a DataGrid in an UserControl. Usercontrol XAML:
flowschi
  • 1
  • 1
  • 2
0
votes
1 answer

DependencyProperty for ItemsSource

I have a XAML like:
Tomtom
  • 9,087
  • 7
  • 52
  • 95
0
votes
2 answers

Windows phone refresh listbox ItemsSource

I have a problem with a RSS feed app. When my app launches, the listbox gets the feeds and show them in my listbox, but when i press my refresh button the listbox never updates, it just show the same items again, but if i close the app, and then…
Thunder
  • 117
  • 18
0
votes
1 answer

WPF ComboBox a better way to format ItemsSource

Morning Guys, I have a few ComboBoxes bound to List of TimeSpan. I am formatting the TimeSpans using IValueConverter and ItemTemplate. I was wondering if there were an easier way to format the TimeSpans. Here's what I'm currently doing. public class…
Steve
  • 2,153
  • 4
  • 22
  • 31
0
votes
2 answers

How do I bind a WPF ListView to a property of each element in a list?

I have the following binding on my ListView, which works fine: Filters is actually a type of List. LogFilters have a property on them called Title. I…
Alexandru
  • 12,264
  • 17
  • 113
  • 208
0
votes
1 answer

WPF DataGrid is not initialized before hooking event

I've got a simple property getter which returns whatever datagrid is curretly selected within a TabbedPanel private DataView ActiveGrid { get { switch (TabPanel.SelectedIndex) { case…
user1021726
  • 638
  • 10
  • 23
0
votes
1 answer

Sending data type as command parameter

I have a list view, which items are defined using ItemsSource. The ItemsSource is a list of local class type. I need to send as a CommandParameter the selected items DataType. Can someone help me with this? Code: (This code is in the App.xaml and…
g-los
  • 33
  • 1
  • 7
0
votes
1 answer

How do I change what shows to not match the ItemsSource in DataGrid?

I have a DataGrid with the DataContext as a list of objects with many properties. All of the columns are bound to a different property of said object type. There is a text property that I only care about if another bool property is set to "true" -…
user2879853
0
votes
0 answers

fill a grid with selected rows of another grid

Code is C# and the datagrid is in XAML. The problem here is that we have one grid with rows of articles. When we select a row, this row must be immediately added to a second grid. We use for this a list, which is defined on a higher level. When…
0
votes
1 answer

process xmlnodeslist programatically in c# instead of XAML

Context: XAML, WPF, C#. There is some XML data. (see below). There is a ListBox that should display the InnerText of subNodes of nodes (because there are others same level as node with as subnode) I obtained XmlNodesList with news=…
acadea
  • 37
  • 1
  • 5
0
votes
2 answers

How to update ItemsSource without ObservableCollection

Running the following code will not remove the item from the list box (as it appears to the user) lbxUserSecurityGroups.ItemsSource = _currentUserGroups; _currentUserGroups.RemoveAt(0); lbxUserSecurityGroups.ItemsSource =…
TruthOf42
  • 2,017
  • 4
  • 23
  • 38
0
votes
1 answer

what's the difference between binding ItemsSource to an ObservableCollection and to a CollectionViewSource?

I know CollectionViewSource support grouping and sorting, except this, is there any other difference between binding ItemsSource to an ObservableCollection and to a CollectionViewSource?
James
  • 2,570
  • 7
  • 34
  • 57
0
votes
1 answer

Refresh ItemsSource from other window

I have a application which has a parent window with some menus on it ,when the menu clicks corresponding usercontrol is loaded inside the parent window as child.The parent window supports many usercontrols on each menu click ,the usercontrols are…
Mussammil
  • 864
  • 4
  • 16
  • 38
0
votes
1 answer

WPF ComboBox which updates its ItemsSource from the database as the Text property changes

I would like to have a ComboBox control on a form which will be used to search a list of investments as the user types. I can do this easily if I cache the entire collection of investments from the database on startup (currently 3,000 or so items),…
TeagansDad
  • 118
  • 2
  • 5