Hi ...

I am using C# and System.Windows.Forms.ListView. I do not see the method that will allow me to select a specific row by index.

My objective is to always keep the last row in the ListView selected and visable.

Using Visual C++ and a ListBox I would do somethings like:
m_ctrlResults.AddString(csMessage);
nCount = m_ctrlResults.GetCount();
m_ctrlResults.SetCurSel(nCount - 1);

Here is my code,
Thanks,
Chris


Code:
        public void WriteStatusMessage(int nSeverity, string strMessage)
        {
            string strDate; 
            string strSeverity; 
            int     nIndex = 0; 
            
            // Add some rows
            ListViewItem item = new ListViewItem();
            

            item.Text = strSeverity;
            item.SubItems.Add(strDate);
            item.SubItems.Add(strMessage);
            listView1.Items.Add(item);
            listView1.ResumeLayout();
			
            // listView1.EnsureVisible(0); 

        }