Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

Rebind the new datatable to the ListView.
 
Share this answer
 
Comments
drcmomo 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900