does anyone have an idea how to select listview subitems
when click.
like highlight and stuff like that
Paresh
Printable View
does anyone have an idea how to select listview subitems
when click.
like highlight and stuff like that
Paresh
int nStart = X ;
int spos = 0 ;
int epos = this.Columns[0].Width ;
for ( int i=0; i < this.Columns.Count ; i++)
{
if ( nStart > spos && nStart < epos )
{
subItemSelected = i ;
break;
}
spos = epos ;
epos += this.Columns[i].Width;
}
Console.WriteLine("SUB ITEM SELECTED = " + li.SubItems[subItemSelected].Text);
subItemText = li.SubItems[subItemSelected].Text ;
this should give you the selected subitems
than you have to chenge the background
let me know if this help
thanks Valentin Rozescu,
I got it working..