I am developing application which has MDI Form which has Binding Navigator and added Binding Source there for Navigation Next , prev, First, last , Add new , delete and Save. Now I had a Child Form which has Tab Control having two tabs Listing and Details.
on Listing Tab i had a user control which displays the data in grid with search functionality and details tab contains the textboxes and dropdown. I have a dataset which is binded to binding source of MDI Parent and same datasource is binded to the usercontrol Grid. Till this time every thing is running well, i am fully able to make all functions of Binding Navigator run well. Now when user changes the text in detail section i need to check that whether existing record has been modified or not if yes then ask for saving before he can leave the records.
Is it possible to map the dataset (datatable ) to controls and keep records that data has been changed. To track this i am using check vairable which is set tospecfic value on leave event of each textbox and compare the Textbox1.Text with the ds.Tables[0].Rows[RowIndex][ColIndex] if value differs then set the flag that data has been changed and on click of navigation panel of listing Panel or closing the form will ask for confirmation that whether you want to save records? if yes then saves the records and else reject the chnages by resetting the flag.
Does anyone has some more efficient way to handle this issue.
Regards,
Nitin
Nabil GHENIMAPosted Apr 5, 2009, 1:55 PM
Hello Nitin,
I'm Tunisian and i'm trying to program an technical winform application with C#.
I'm an engineer and the technical manager of an oil refinery company. I like C# programming but i'm new in the C#.
I'm looking for and example of using ONE BindingNavigator in the MDI Form and use the BindingSources in the Child Forms to navigate into the Datagrids and the Textboxes.
I found your Message in C# Corner forum and I think you found the way to do this.
Can you please help me to do this work? How to make the link bettween the MDI Form BindingNavigator and the Child Forms BindingSources.
An example will be the best way to understand this.
My Email : [email protected]
BEST REGARDS
Satish KathiPosted Jul 25, 2008, 3:27 PM
Implement System.ComponentModel.INotifyPropertyChanged
You can refer
http://www.codeproject.com/KB/cs/BindBetterINotifyProperty.aspx
there is one article in CoDe magazine
http://www.code-magazine.com/article.aspx?quickid=0603011&page=3
Hope this helps