Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: problem while using delegates in c# Pin
DaveyM6911-May-10 21:33
professionalDaveyM6911-May-10 21:33 
AnswerRe: problem while using delegates in c# Pin
Luc Pattyn12-May-10 2:00
sitebuilderLuc Pattyn12-May-10 2:00 
AnswerRe: problem while using delegates in c# Pin
Hristo-Bojilov12-May-10 3:10
Hristo-Bojilov12-May-10 3:10 
Questionhow to create cab file from setup exe file using cabsdk Pin
NarVish11-May-10 19:37
NarVish11-May-10 19:37 
AnswerRe: how to create cab file from setup exe file using cabsdk Pin
Abhinav S11-May-10 20:20
Abhinav S11-May-10 20:20 
QuestionHow to encrypt data in mySQL using C# Pin
MissNano11-May-10 18:34
MissNano11-May-10 18:34 
AnswerRe: How to encrypt data in mySQL using C# Pin
Peace ON11-May-10 22:14
Peace ON11-May-10 22:14 
QuestionDate Pickers with Checkboxes and Modified Rows Pin
gmhanna11-May-10 17:44
gmhanna11-May-10 17:44 
Hi,

I'm going to try to explain this the best I can. I have a SQL table that contains a datetime field that I am using a date picker control. This field is a verification date field for the last time the information was verified. This field can also be null if the data has not been verified. I am using a checkbox on the date picker so if the information has been verified it is checked, unverified not checked.

Since SQL has no concept of this checkbox, I have written some code that works almost perfect. It gets the current row like this:

var currentRow =
                ((myDataSet.ReunionRow)(((DataRowView)
                (myBindingSource.Current)).Row));


and then sets the checkbox accordingly like this:
if (currentRow.IsVerifiedNull())
     {
         verifiedDateTimePicker.Value = DateTime.Today;
         verifiedDateTimePicker.Checked = false;
         Debug.WriteLine("Verified is null");
     }
     else
     {
         verifiedDateTimePicker.Value = currentRow.Verified;
         verifiedDateTimePicker.Checked = true;
     }


So far so good, you can navigate through the data forwards/backwards everything looks great. Then the user decides to change the verified information and doesn't click the save button on the navigator bar, scrolls away from this row and eventually comes back to it. My code happily gets the old data!

So my question is how can I tell if this row is modified to skip this logic, or how can I get the modified row?

Thank you,
Glenn

AnswerRe: Date Pickers with Checkboxes and Modified Rows Pin
Stanciu Vlad11-May-10 19:27
Stanciu Vlad11-May-10 19:27 
QuestionWhere to get started Pin
crosson11-May-10 17:09
crosson11-May-10 17:09 
AnswerRe: Where to get started Pin
Peace ON11-May-10 21:58
Peace ON11-May-10 21:58 
AnswerRe: Where to get started Pin
Richard MacCutchan11-May-10 22:27
mveRichard MacCutchan11-May-10 22:27 
AnswerRe: Where to get started Pin
crosson12-May-10 10:51
crosson12-May-10 10:51 
AnswerRe: Where to get started Pin
Ravi Sant14-Apr-11 1:22
Ravi Sant14-Apr-11 1:22 
QuestionSerialization Question Pin
Kevin Marois11-May-10 11:14
professionalKevin Marois11-May-10 11:14 
AnswerRe: Serialization Question Pin
William Winner11-May-10 11:40
William Winner11-May-10 11:40 
GeneralRe: Serialization Question Pin
Kevin Marois11-May-10 11:55
professionalKevin Marois11-May-10 11:55 
GeneralRe: Serialization Question Pin
William Winner11-May-10 12:07
William Winner11-May-10 12:07 
GeneralRe: Serialization Question Pin
Kevin Marois11-May-10 12:15
professionalKevin Marois11-May-10 12:15 
GeneralRe: Serialization Question Pin
William Winner11-May-10 12:43
William Winner11-May-10 12:43 
GeneralRe: Serialization Question Pin
Kevin Marois11-May-10 12:54
professionalKevin Marois11-May-10 12:54 
GeneralRe: Serialization Question Pin
William Winner12-May-10 6:01
William Winner12-May-10 6:01 
GeneralRe: Serialization Question Pin
Kevin Marois12-May-10 6:39
professionalKevin Marois12-May-10 6:39 
AnswerRe: Serialization Question Pin
William Winner11-May-10 12:44
William Winner11-May-10 12:44 
Questioninternal keyword, InternalsAvailableTo Pin
Ryan Minor11-May-10 8:13
Ryan Minor11-May-10 8:13 

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.