Search code examples
c#wpf

in WPF application, how to save and display the data entered by user in the same page without saving the data in the database?


I am creating the WPF Application, I have fields that needs to be filled by user then Click on Add. Then User has to see what they have selected and Add more if they want.

For Example, They add EmployeeName, Designation, Location etc Then click on Add.

In the next section of the same page, I need to display the added information, and allow the user to add more and display as they keep added.

Now my question is how can we show the added information without storing them in database?


Solution

  • You are talking about 2 controls, the first is the entry form and the other is the list.

    If all you are wanting is to add to the list then bind your list to an observable collection and simply add to that collection. But you must use an ObservableCollection<T>.