Click here to Skip to main content
Rate this: bad
good
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 9:55am
drcmomo1.1K

1 solution

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

Solution 1

Rebind the new datatable to the ListView.
  Permalink  
Comments
drcmomo at 3-Mar-11 16:44pm
   
Yes I rebind the new DataTable.
 
Code :
Form1
Before
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.Items.Clear();
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.
Thanks

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

  Print Answers RSS
0 OriginalGriff 381
1 Praneet Nadkar 237
2 Marcin Kozub 225
3 Sergey Alexandrovich Kryukov 200
4 Shweta N Mishra 161
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.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