Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: WPF
Good moning,
I developed a application contains 2 pages
The first contains a ListView. with a dataTable(dt) I fill my ListView (ListView.Datacontext = dt.
In the second Page(ListUser : Window)
I display et update the values of the selected columns da ListView. then I record in the database.
At the close of the second page, I retrieve the data change in the database in order to display it in the ListView does not refresh Listview.La
Please help me if you can, because I stuck for 4 days
Excuse me my english is very bad bad
Posted 3-Mar-11 8:55am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rebind the new datatable to the ListView.
drcmomo at 3-Mar-11 16:44pm
Yes I rebind the new DataTable.
Code :
DataTable_DtLstAutomate = BusinesslogicLayer.ManagerBllMachine.Instance.AllMachine();
lstAutomate.DataContext = _DtLstAutomate;
After Update Data in the second Form I call et new fonction
private void DisplayPagingInfo()
DataTable dt = BusinesslogicLayer.ManagerBllMachine.Instance.AllMachine();
lstAutomate.DataContext = dt ;
ListView not Refresh
drcmomo at 3-Mar-11 16:48pm
Can You said me please how refresh Form1
If I refresh the Form, I can refresh all control in the Form.
I don't know if you understand I'm sorry my english bad.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 3 Mar 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100