Click here to Skip to main content
16,016,306 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
Mark Salsbery30-Oct-08 8:18
Mark Salsbery30-Oct-08 8:18 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
chandrap30-Oct-08 8:23
chandrap30-Oct-08 8:23 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
Mark Salsbery30-Oct-08 8:47
Mark Salsbery30-Oct-08 8:47 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
chandrap30-Oct-08 8:50
chandrap30-Oct-08 8:50 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
Mark Salsbery30-Oct-08 9:01
Mark Salsbery30-Oct-08 9:01 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
chandrap30-Oct-08 9:17
chandrap30-Oct-08 9:17 
GeneralRe: Problem of Unloading Managed C++ DLL... Pin
Mark Salsbery30-Oct-08 9:45
Mark Salsbery30-Oct-08 9:45 
QuestionManipulating dates from bound DataGridView Pin
kanchoette30-Oct-08 5:11
kanchoette30-Oct-08 5:11 
I have a dataGridView control which I wish to

1) retrieve a date from
2) subtract days from the retrieved date
3) see if todays date is greater than the the result of item (2)
4) set an appropriate image in one of the dataGridView columns

I have tried:

int alertDays = 0; 
            
            foreach (DataGridViewRow row in keyEventsDataGridView.Rows)
            {
                DateTime alertDate = (DateTime) row.Cells[4].Value;
                
                foreach (DebtorDataSet.KeyEventsRow eventRow in debtorDataSet.KeyEvents)
                {
                    if(eventRow.Code.ToString() == row.Cells["KeyEventCode"].Value.ToString())
                        {
                            alertDays = ((int) eventRow.AlertDays);
                        }
                }

                alertDate.AddDays(0 - alertDays);

                if (DateTime.Compare(DateTime.Now, alertDate) < 0)
                {
                    row.Cells["Status"].Value = keyEventIconsImageList.Images[0];
                }
                else
                    row.Cells["Status"].Value = keyEventIconsImageList.Images[1];
            }


the line

DateTime alertDate = (DateTime) row.Cells[4].Value;

is giving me problems as it returns no value in debugging mode.
What should the correct syntax for this be please?
AnswerRe: Manipulating dates from bound DataGridView Pin
Ben Fair30-Oct-08 5:51
Ben Fair30-Oct-08 5:51 
AnswerRe: Manipulating dates from bound DataGridView Pin
kanchoette30-Oct-08 23:17
kanchoette30-Oct-08 23:17 
GeneralRe: Manipulating dates from bound DataGridView Pin
kanchoette31-Oct-08 0:03
kanchoette31-Oct-08 0:03 
Questioncalculating difference betwen to time and dates Pin
Matjaz-xyz30-Oct-08 4:22
Matjaz-xyz30-Oct-08 4:22 
AnswerRe: calculating difference betwen to time and dates Pin
Dan Neely30-Oct-08 4:27
Dan Neely30-Oct-08 4:27 
GeneralRe: calculating difference betwen to time and dates Pin
Matjaz-xyz30-Oct-08 6:57
Matjaz-xyz30-Oct-08 6:57 
GeneralRe: calculating difference betwen to time and dates Pin
emiaj30-Oct-08 7:07
emiaj30-Oct-08 7:07 
QuestionHow to check are files for complex script and rtl languages installed Pin
Dino Mulahusic30-Oct-08 4:05
professionalDino Mulahusic30-Oct-08 4:05 
AnswerRe: How to check are files for complex script and rtl languages installed Pin
Giorgi Dalakishvili30-Oct-08 4:15
mentorGiorgi Dalakishvili30-Oct-08 4:15 
GeneralRe: How to check are files for complex script and rtl languages installed [modified] Pin
Dino Mulahusic30-Oct-08 5:00
professionalDino Mulahusic30-Oct-08 5:00 
Questionapp config file issue Pin
George_George30-Oct-08 3:43
George_George30-Oct-08 3:43 
AnswerRe: app config file issue Pin
Giorgi Dalakishvili30-Oct-08 4:12
mentorGiorgi Dalakishvili30-Oct-08 4:12 
GeneralRe: app config file issue Pin
George_George30-Oct-08 23:38
George_George30-Oct-08 23:38 
GeneralRe: app config file issue Pin
Giorgi Dalakishvili30-Oct-08 23:45
mentorGiorgi Dalakishvili30-Oct-08 23:45 
GeneralRe: app config file issue Pin
George_George31-Oct-08 0:02
George_George31-Oct-08 0:02 
GeneralRe: app config file issue Pin
Giorgi Dalakishvili31-Oct-08 1:08
mentorGiorgi Dalakishvili31-Oct-08 1:08 
GeneralRe: app config file issue Pin
George_George4-Nov-08 2:22
George_George4-Nov-08 2:22 

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.