Calculate business days, Insert Keys and Diagrams : Hi everybody i'm working on  a problem in C++ Builder, i have to create a task management software for a company, but i have too much trouble with some concepts. So my 1st problem is a simple one but i don't see the error:
I have on my form a TrStringGrid which is a modified TStringGrid and i want that each time the user clicks on insert on the keyboard that a row is filled automatically. The app starts with a tstringgrid with 2 rows, one is fixed and can't be modified and the second one is empty.
That's what it look like:

[![Grid][1]][1]


  [1]: http://i.stack.imgur.com/K4cSl.png



So what i want to do is that the first time the user press the insert key the row n°2 is filled (the row that is not grey). The second and subsequent times the user press the insert key a row is added and filled automatically. I can't get it work and i don't know if i'm doing it the good way or not.


        //method called each time a key is pressed 
    void __fastcall TForm1::rStringGridEd1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift)
    {
    int counter = 1;
    switch(Key)
    {
    	case VK_INSERT: //VK_INSERT for the insert button
    	if(counter < 2)
    	{
    		for (int i = 0;i< rStringGridEd1->RowCount; i++) {
    		   rStringGridEd1->Cells[0][i] = "a";
    		   rStringGridEd1->Cells[1][i] = "b";
    		   rStringGridEd1->Cells[2][i] = "c";
    		   rStringGridEd1->Cells[3][i] = "d";
    		   rStringGridEd1->Cells[4][i] = "e";
    		   counter++;
    		}
    	}
    	if(counter >= 2){
    		for (int i = 0;i< rStringGridEd1->RowCount; i++) {
    		rStringGridEd1->RowCount++; // this is used to add a row
    		   rStringGridEd1->Cells[0][i] = "a";
    		   rStringGridEd1->Cells[1][i] = "b";
    		   rStringGridEd1->Cells[2][i] = "c";
    		   rStringGridEd1->Cells[3][i] = "d";
    		   rStringGridEd1->Cells[4][i] = "e";
    		   counter++;
    		}
    	}
    }
    }

My next problem is how to add only business days to a specific date that the user entered. I can't get it work correctly.

        //Method I used to calculate date is the start date and the variable days are the days to add to date to get the new date
    TDate __fastcall TForm1 ::calulatenewdate( TDate date, int days)
    {
    TDate tmp; //tmp is used inside this method as date
    tmp = date;
    // j is used for to get the day of the week (Monday, Tuesday, Wesdnesday, etc..)
    int j; 
    
    		 if (days == 1){
    	  return date;}
      if (days == 2){
    	  tmp= +1;
    	  j = DayOfWeek(tmp); 
    // the day of the week is given in numbers from 1 to 7 ( 1 = Sunday, 2 = Monday, 3 = Wesdnesday,etc…)
    
    	  if (j == 7) {             //So if j =7 which is Saturday add two days to get to monday 
    		tmp = tmp+2;
    		return tmp;
    	  }else{
    		  return tmp;
    	  }          }
    
    	  if(days > 2){ 				 // if the user enter a day greater than 2
    	 for(int i =0; i < days;i++)
    	 {
    	   tmp=tmp+1;
    	  j = DayOfWeek(tmp);
    	  if (j == 7) {
    		tmp =+2;
    }
    }
    	  return tmp;
    	 }           

and my third and last problem is that i want to draw horizontal diagrams,are there any good ones out there? Can anyone recommend me one? I'm really sorry for my bad english, it's not my mothertongue.
