If you are using MVVM you do not want to wire up the event on Data Grid for an updated source.
So if you want to know the change in items of the collection you need to subscribe to the Collection Changed event of the Observable Collection But there is a problem with Observable Collection.
(key,value); for all the item, create above object(remember key should be unique), where value will represent the string to display, like "Electicity" etc. then get the selected item and change the value to new value or replace the old key value pair item with new one. However, you may also use the item index property which is also unique for each item. Text; But as soon as I select an item in the list box and try to feed a new value in the textbox1 it shows me this error: An unhandled exception of type 'System. Thank you all above give code will trigger list Box1_Selected Index Changed event so be careful. 2) Another more handy approach (if the table is not too big) is to write code to show records in the list box directly from the db table and every time you perform an operation (add/edit/delete) in the database just call the method of redisplaying the data afresh in the front end.
but i think in your problem you should put the code in textbox's text change event. Its the developer's job to decide which solution will be best suited.
Like this if the user enters House Electricity Food. Add(textbox1.text); it copies only to combobox1, but I have multiple combobox ie, combobox1,combobox2 ......comboboxn. The result: 1) The form looks like this in the beginning:refer First Pic of the Attachment 2) After double clicking the item Tap: refer Second Image of the attachment 3) I replaced the text Box Text witht the text "Cooler" and that gets reflected in the combobox and the listbox as well as in the third pic :) Check if this is exactly what you want. And also I wanted to copy the categoryname in my database column to the Listbox as soon as the form loads. Search in the internet for data binding in a list Box.
If you want to display a large amount of data from a file, a naive asynchronous (or, for that matter, multithreaded) approach can run into problems.
The keywords deal easily with long waits, but if you’re doing something slightly more busy you may need to apply these techniques with a bit more subtlety.
For the most part, this has made it much easier to improve a user interface’s responsiveness—you can use asynchronous APIs to perform potentially slow work in a way that will not cause your user interface to freeze, and yet you can use simple programming techniques that look very similar to those used in single-threaded code. There are some kinds of slow, IO-oriented work (i.e., the kind of work that often benefits most from asynchrony) where a simple application of these techniques won’t help as much as you might hope.
For example, you can run into trouble if you’re doing something that’s slow, but not quite slow enough.