❔ dictionary as datasource
if i do
...DataSource = dic.Values
it works but it don't keep it updated when i add/remove value from the dictionary19 Replies
well, what does
dic.Values
give you?the values
i mean what type does it give you
because it's not the same object as the dictionary
dic.Values does what i want
but it don't keep updated
...so it doesn't do what you want
and i'm trying to help you learn why
....
value with key
200000
doesn't get addedso
what is the answer to my original question?
artikel
try again
IDictionary<int, Artikel> _artikelsList = new Dictionary<int, Artikel>();
that is not what
_artikelsList.Values
gives youcollection
?
valuecollection but close enough
winforms probably doesn't know how to understand when that is updated
so should i use a dictionary?
if you look at the docs it explains what kinds of objects are supported for data binding https://learn.microsoft.com/en-us/dotnet/desktop/winforms/data/overview?view=netdesktop-7.0
Overview of Data Binding and Windows Forms - Windows Forms .NET
Learn about interfaces related to Data Binding, data sources supported by Windows Forms, and types of Data Binding.
bananas
i want to insert list of article into another but i don't want duplicate value with
id
property
article has a property id
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.no
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.