title: how to get selected row from DevExp AspxGridview
body: <p>I am trying to get the selected row from the aspxgridview when the user clicks the "SEÇ"("SELECT") button on screen as shown below.</p>
  
  <p>when the user click the SEC button, it gives null reference exception</p>
  
  <p>What am doing wrong? </p>
  
  <p>here is my code...</p>
  
  <pre><code>protected void btnClose0_Click(object sender, EventArgs e)
      {
          try
          {
              string cari_logref = gvCari.GetDataRow(gvCari.FocusedRowIndex)["LOGICALREF"].ToString();
  
              dtneww = ListTable(Convert.ToInt16(cari_logref));
              gv.DataSource = dtneww;
              gv.DataBind();
          }
          catch (Exception)
          { }
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/itZLy.png" alt="enter image description here"></p>