Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
GeneralRe: No GUI when I create process on remote PC Pin
Programm3r14-Jan-09 2:54
Programm3r14-Jan-09 2:54 
GeneralRe: No GUI when I create process on remote PC Pin
Programm3r14-Jan-09 3:17
Programm3r14-Jan-09 3:17 
AnswerRe: No GUI when I create process on remote PC Pin
Dave Kreskowiak14-Jan-09 3:44
mveDave Kreskowiak14-Jan-09 3:44 
Questionadapter.fill method Catch and Finally block do not execute Pin
mpavas14-Jan-09 1:56
mpavas14-Jan-09 1:56 
AnswerRe: adapter.fill method Catch and Finally block do not execute Pin
Colin Angus Mackay14-Jan-09 2:04
Colin Angus Mackay14-Jan-09 2:04 
AnswerRe: adapter.fill method Catch and Finally block do not execute Pin
Christian Graus14-Jan-09 2:27
protectorChristian Graus14-Jan-09 2:27 
QuestionDefault character sets for fonts and foreign characters Pin
tim_gunning14-Jan-09 1:55
tim_gunning14-Jan-09 1:55 
QuestionDataGridView and DataSet , Update and AccpetChanges Pin
half-life14-Jan-09 1:52
half-life14-Jan-09 1:52 
Hi,

the situation is this :

i have a datagridview bound to a dataset.

when i click on a button i've got on every datagridviewRow i need to update the changes in the same row, the thing is that i need also to change a column named "status" in the same row

here is the event :

private void dgvCalibrtion_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {

     if( e.ColumnIndex == 6)
     {
             UpdateCalibrtionData((dgvCalibrtion.Rows[e.RowIndex].DataBoundItem as DataRowView).Row, e.RowIndex);
             TA_CalibrationData.Update((dgvCalibrtion.Rows[e.RowIndex].DataBoundItem as DataRowView).Row);
             dS_StationManager.T_CalibrationData.AcceptChanges();


     }
 }



the thing is that the change in the column status //Cell[2]// never send to the DB
the Datagridview shows the string ("Valid", ... ) but does'nt pass the change to the *.mdb,
Neither the color of the string is changed.

but all the other manually changes to the datagridview ( input from user ) is updated o.k.
//Here i'm changing the value of the cell myself//


private void UpdateCalibrtionData(DataRow dgvDataRow, int RowIndex)
{

    DateTime ncalTime = (DateTime)dgvDataRow.ItemArray[3];

    if (ncalTime < DateTime.Now)
    {
        dgvCalibrtion.Rows[RowIndex].Cells[2].Style.ForeColor = Color.Red;
        dgvCalibrtion.Rows[RowIndex].Cells[2].Value = "Date Expired";
        return;
    }

    if (ncalTime > DateTime.Now)
    {
        if (ncalTime < DateTime.Now.AddDays(SM_ApplicationData.Instance.CalibrationThreshold))
        {
            TimeSpan dayDiff = (DateTime.Now - ncalTime);
            int dDays = -(dayDiff.Days - 1);
            dgvCalibrtion.Rows[RowIndex].Cells[2].Style.ForeColor = Color.Orange;
            dgvCalibrtion.Rows[RowIndex].Cells[2].Value = "will expire in" + dDays.ToString() + " Days";
            return;
        }

        dgvCalibrtion.Rows[RowIndex].Cells[2].Value = "Still Valid";
        dgvCalibrtion.Rows[RowIndex].Cells[2].Style.ForeColor = Color.Green;
    }
}


any one???

Smile | :) Smile | :) Smile | :)
Have a nice day

Have Fun
Never forget it

QuestionPlease Can any one Help Pin
Member 284246814-Jan-09 1:24
Member 284246814-Jan-09 1:24 
AnswerRe: Please Can any one Help Pin
musefan14-Jan-09 1:39
musefan14-Jan-09 1:39 
AnswerRe: Please Can any one Help Pin
musefan14-Jan-09 1:46
musefan14-Jan-09 1:46 
AnswerRe: Please Can any one Help Pin
Colin Angus Mackay14-Jan-09 2:15
Colin Angus Mackay14-Jan-09 2:15 
AnswerRe: Please Can any one Help Pin
Member 284246814-Jan-09 2:53
Member 284246814-Jan-09 2:53 
GeneralRe: Please Can any one Help Pin
vaghelabhavesh14-Jan-09 8:58
vaghelabhavesh14-Jan-09 8:58 
Questionconstructing own tcp/ip header Pin
Member 458420114-Jan-09 0:59
Member 458420114-Jan-09 0:59 
AnswerRe: constructing own tcp/ip header Pin
Dave Kreskowiak14-Jan-09 3:39
mveDave Kreskowiak14-Jan-09 3:39 
Questionstoring Data from textbox created At runtime? Pin
developer.ravish14-Jan-09 0:53
developer.ravish14-Jan-09 0:53 
AnswerRe: storing Data from textbox created At runtime? Pin
Tom Deketelaere14-Jan-09 1:25
professionalTom Deketelaere14-Jan-09 1:25 
GeneralRe: storing Data from textbox created At runtime? Pin
developer.ravish14-Jan-09 2:32
developer.ravish14-Jan-09 2:32 
GeneralRe: storing Data from textbox created At runtime? [modified] Pin
Tom Deketelaere14-Jan-09 2:44
professionalTom Deketelaere14-Jan-09 2:44 
GeneralRe: storing Data from textbox created At runtime? Pin
developer.ravish14-Jan-09 19:19
developer.ravish14-Jan-09 19:19 
GeneralRe: storing Data from textbox created At runtime? Pin
Tom Deketelaere14-Jan-09 20:53
professionalTom Deketelaere14-Jan-09 20:53 
GeneralRe: storing Data from textbox created At runtime? Pin
developer.ravish15-Jan-09 1:00
developer.ravish15-Jan-09 1:00 
GeneralRe: storing Data from textbox created At runtime? Pin
Tom Deketelaere15-Jan-09 1:30
professionalTom Deketelaere15-Jan-09 1:30 
GeneralRe: storing Data from textbox created At runtime? Pin
developer.ravish15-Jan-09 2:36
developer.ravish15-Jan-09 2:36 

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.