okay I have been looking all over the web trying certain pieces of code and I have had no luck. I am tired and I really am at a lost right now. I am trying to make it so that when the user mouses over a select set of cells (they are all in the same column, just each row would display a different tooltip outcome). Here is the code let me explain some more after i post this class
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WorkSchedule_App_1v3
{
//=======================================================================================
public partial class employeeAlterForm4 : Form
{
static readInFileDel2 readInFileCall = new readInFileDel2
(readInFileClass2.readInFile2);
static Employee [] employeeTempArray;
//---------------------------------------------------------------------------------------
public employeeAlterForm4()
{
InitializeComponent();
readInFile();
bool supHold = false;
dataGridView1.ColumnCount = 4;
dataGridView1.Columns [0].Name = "Employee Name";
dataGridView1.Columns [1].Name = "Date of Birth - Age";
dataGridView1.Columns [2].Name = "Position";
dataGridView1.Columns [3].Name = "Shift Types";
for (int i = 0; i < employeeTempArray.Length - 1; i++)
{
dataGridView1.Rows.Add();
dataGridView1 [0, i].Value = employeeTempArray [i].isName();
dataGridView1 [1, i].Value = employeeTempArray [i].isDOB();
supHold = employeeTempArray [i].isSup();
if (supHold == true)
{
dataGridView1 [2, i].Value = "Supervisor";
}
else
{
dataGridView1 [2, i].Value = "Employee";
}
}
}
//---------------------------------------------------------------------------------------
public static void readInFile() //reads the employee File
{
employeeTempArray = readInFileCall("employeeSave.txt");
}
//---------------------------------------------------------------------------------------
}
//=======================================================================================
}
Okay and now let me include a screen of what it looks like (what this code produces)
http://i109.photobucket.com/albums/n65/Vin_diesalxxx/dataGridViewtooltiphelp.jpg
(I erased out the last name of the first person that is not an error)
Now what I want it to do is that in this employeeTempArray you see is a method
employeeTempArray[index].isAge()
Which returns the age of the person who is in the system. Well what I want this code to do is that when you mouse over the persons Date Of Birth they get their age (so I would have to find a way to pull up the index of the array corresponding to the row and then display this stubborn method from a static class into a private class...stupid forms, as a tooltip). I would love it so that it would change automatically if I hover over a new date (the tooltip being displayed where the mouse is located). I know some C# programming (althought I don't consider myself an expert), but I hope you can help me? I have been search the web and am finally calling it quits, I am tired and need some sleep. Thanks in advance to all the help you can give.
Oh also if anyone can help me find a way that when I click the date of birth to sort, that it will sort by the age (cause that dob is a string)