Click here to Skip to main content
15,892,697 members
Home / Discussions / C#
   

C#

 
QuestionWindows Service Stop working Pin
Shajeel21-Jun-06 19:40
Shajeel21-Jun-06 19:40 
AnswerRe: Windows Service Stop working Pin
Tehnoon21-Jun-06 22:35
Tehnoon21-Jun-06 22:35 
GeneralRe: Windows Service Stop working Pin
Shajeel21-Jun-06 23:42
Shajeel21-Jun-06 23:42 
QuestionControl Events Pin
Tyrus18221-Jun-06 16:23
Tyrus18221-Jun-06 16:23 
AnswerRe: Control Events Pin
Stefan Troschuetz21-Jun-06 22:05
Stefan Troschuetz21-Jun-06 22:05 
AnswerRe: Control Events Pin
jjansen22-Jun-06 20:40
jjansen22-Jun-06 20:40 
QuestionHow can I hide the caret of a RichTextBox control? [modified] Pin
AngryC21-Jun-06 15:03
AngryC21-Jun-06 15:03 
QuestionDatabindings Question Pin
Drew McGhie21-Jun-06 12:08
Drew McGhie21-Jun-06 12:08 
I'm programming a windows forms application that retrieves information from a database, binds it to various controls(datagrids, textboxes, datetimepickers,etc.). The binding happens correctly and saving and loading work just fine.
An issue, however, has arisen in the need to catch the form before it closes to ask the user if they want to save. Just catching the event and calling the save function if the user wants to save works, but I'm looking for a way to check the data before the dialog box pops, and suppressing the box from showing if there have been no changes.

I see this as being potentially doable from one of two places:
Within my handler class, which houses the database and the appropriate saving and loading functionality, as well as exposing the tables to the other classes.

Within the BindingSource elements(there are about a dozen).

The problem is, that I don't see any event or member in each one that I can handle or check to see if the data is different from the original.

I tried using a set of foreach loops that loops through every table in the dataset, every row in the table, and checking the RowState parameter, but they remain UnModified, because I don't call EndEdit() on the bindingsources (because I don't think I should do that until I'm actually saving).

Obviously, I could handle the Changed event on each control that I bindto, and set a boolean to true anytime after binding, but that seems very overkill and it seems like there should be an easier/better/more efficent way.
AnswerRe: Databindings Question Pin
Edbert P21-Jun-06 14:30
Edbert P21-Jun-06 14:30 
GeneralRe: Databindings Question Pin
Drew McGhie22-Jun-06 3:30
Drew McGhie22-Jun-06 3:30 
QuestionTreeNode image question Pin
likefood21-Jun-06 11:49
likefood21-Jun-06 11:49 
GeneralRe: TreeNode image question Pin
BoneSoft21-Jun-06 11:56
BoneSoft21-Jun-06 11:56 
QuestionIConvertible Error (part deux from previous post) Pin
leckey21-Jun-06 11:39
leckey21-Jun-06 11:39 
AnswerRe: IConvertible Error (part deux from previous post) Pin
led mike21-Jun-06 19:24
led mike21-Jun-06 19:24 
QuestionForm based post with file and data [modified] Pin
Green Goblin21-Jun-06 11:09
Green Goblin21-Jun-06 11:09 
QuestionGeneric class [modified] Pin
torontomouse21-Jun-06 10:46
torontomouse21-Jun-06 10:46 
AnswerRe: Generic class Pin
Josh Smith21-Jun-06 10:52
Josh Smith21-Jun-06 10:52 
GeneralRe: Generic class Pin
torontomouse21-Jun-06 16:43
torontomouse21-Jun-06 16:43 
GeneralRe: Generic class Pin
Josh Smith24-Jun-06 15:33
Josh Smith24-Jun-06 15:33 
AnswerRe: retrieving command line arguments from a file Pin
Judah Gabriel Himango21-Jun-06 11:57
sponsorJudah Gabriel Himango21-Jun-06 11:57 
QuestionHow can I send to back a mdi child window? Pin
User 309585921-Jun-06 10:43
User 309585921-Jun-06 10:43 
Questiondata unbinding relate...urgnt plzz Pin
r_e_h_a_n21-Jun-06 10:33
r_e_h_a_n21-Jun-06 10:33 
AnswerRe: data unbinding relate...urgnt plzz Pin
Edbert P21-Jun-06 14:50
Edbert P21-Jun-06 14:50 
QuestionBiztalk 2004: How to pass database facts from C# code? Pin
pankazmittal21-Jun-06 10:25
pankazmittal21-Jun-06 10:25 
QuestionSQL Express 2005 Dumper for SQL Server 2005 Pin
emran83421-Jun-06 10:14
emran83421-Jun-06 10:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.