title: List view Items Click Event
body: <p>i am working on a Project, in which i have some data in list view and open button outside the list view through which i can open the data selected in the list view, ("for example I've user Personal Info in List view and i have a button named "Open" outside the list view so that i can Open and Modify the selected data Data ") , now problem is arising when i haven't selected any of the column in the list view and when i click on Open key then the Program should given a exception that "Please Select At least one Column to open " , my code of the UserlistForm is given below through which I've opened and navigated to the other form </p>
  
  <p>frmUserList.cs Code:</p>
  
  <pre><code>  private void btnOpen_Click(object sender, EventArgs e)
          {
  
              int UserID;
              string sql;
  
              UserID = Convert.ToInt32(lvUsers.SelectedItems[0].Text.ToString());
  
              sql = "";                   
              sql += "SELECT * FROM UserLogin WHERE UserLogin.UserId = "+ UserID +"";
  
  
              SqlConnection cn = new SqlConnection();
              SqlCommand rs = new SqlCommand();
              SqlDataReader sdr = null;
              clsConnection clsCon = new clsConnection();
  
  
              clsCon.fnc_ConnectToDB(ref cn);
  
              //rs = new SqlCommand();
              rs.Connection = cn;
              rs.CommandText = sql;
              sdr = rs.ExecuteReader();
  
              this.Close();
  
              frmUserBio frm = new frmUserBio(ref sdr);
              frm.Show();
              //while (sdr.Read())
              //{
              //    //strLogin = sdr.GetString(sdr.GetOrdinal("LogIn"));
  
              //}
              sdr.Close();
              rs = null;
              cn.Close();
  
          }
  </code></pre>
  
  <p>now i want to know such kind of event or anything through which i can check weather the data or any of the column is selected or not just like </p>
  
  <pre><code>if (// something through which i can check weather any of the column is selected or not)
                  {
                      MessageBox.Show("Please Select At least one Column");
                  }
  </code></pre>
  
  <p>Please Tell me how to do this thing... :) Thanks.</p>