Hi, ive been trying to produce something using a listview control which shows error messages for the emails sent from my application. Its a wierd concept so im going to try explain it best i can. I want to be able to have 3 items across the listbox each with a icon and a tooltip. Something similar to the below.. Item 1 has a icon next to it and when i hover over it i get a tooltip displaying the error message. Then the same again for items 2,3,4 etc.etc.
Heres the code i have at the moment which only does single column.
row.ItemArray[0] = ID;
"" "" [1] = email address
"" "" [4] = Error Message
Anyone know how i may go about producing what i need. I'm hoping theres an option im missing. I tried using 3 columns with sub items but subitems dont allow icons or tooltips.
Many Thanks,
Piercy
Code:
| Item 1 | Item 2 | Item 3 | | Item 4 | Item 5 | Item 6 |
Heres the code i have at the moment which only does single column.
Code:
foreach (DataRow row in ds1.Tables["Receipitants"].Rows)
{
if (row.ItemArray[1].ToString() != null)
{
if (row.ItemArray[1].ToString().Length > 0)
{
ListViewItem lvi = new ListViewItem(row.ItemArray[3].ToString() + " (" + row.ItemArray[1].ToString() + ")");
lvi.ToolTipText = row.ItemArray[4].ToString();
lvi.ImageIndex = 0;
listView1.Items.Add(lvi);
}
else
{
ListViewItem lvi = new ListViewItem(row.ItemArray[3].ToString());
lvi.ToolTipText = row.ItemArray[4].ToString();
lvi.ImageIndex = 1;
listView1.Items.Add(lvi);
}
}
else
{
ListViewItem lvi = new ListViewItem(row.ItemArray[3].ToString());
lvi.ToolTipText = row.ItemArray[4].ToString();
lvi.ImageIndex = 1;
listView1.Items.Add(lvi);
}
}
"" "" [1] = email address
"" "" [4] = Error Message
Anyone know how i may go about producing what i need. I'm hoping theres an option im missing. I tried using 3 columns with sub items but subitems dont allow icons or tooltips.
Many Thanks,
Piercy
Comment