title: How to handle OnRowClick event of ASPxGridView in code behind?
body: <p>I am using ASP.Net with VB to display records in a grid view.
  In a normal ASP GridView, I can simply handle SelectedIndexChanged Event from code behind like this:</p>
  
  <pre><code>Sub mySub(ByVal sender as Object, ByVal e As EventArgs) 
            Handles GridView1.SelectedIndexChanged
    Dim id as String = GridView1.SelectedRow.Item(0).ToString
    Response.Redirect("Customer.aspx?ID=" &amp; id) 'Or Whatever
  End Sub
  </code></pre>
  
  <p>Now I am trying to do the same but with ASPxGridView that comes with DevExpress. Obviosly, there is no built in Event that can be handled directly from code behind. I have to go through client click with javascript, which I don't mind to but all my attempts to pass the click event from the client to the server code behind failed.</p>
  
  <p>Here is my ASP page</p>
  
  <pre><code>&lt;dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
       KeyFieldName="id" Width="550px" OnSelectionChanged="row_selected" &gt;
      &lt;SettingsBehavior AllowFocusedRow="True" /&gt;
      &lt;SettingsText Title="Customers" /&gt;
      &lt;Columns&gt;
          &lt;dx:GridViewDataTextColumn FieldName="id" ReadOnly="True" VisibleIndex="1"&gt;
              &lt;EditFormSettings Visible="False" /&gt;
          &lt;/dx:GridViewDataTextColumn&gt;
          &lt;dx:GridViewDataTextColumn FieldName="Name" VisibleIndex="2"&gt;
          &lt;/dx:GridViewDataTextColumn&gt;
      &lt;/Columns&gt;
      &lt;Settings ShowTitlePanel="True" /&gt;
      &lt;ClientSideEvents FocusedRowChanged="function(s, e) {
          row_selected();
          }" /&gt;
  &lt;/dx:ASPxGridView&gt;
  </code></pre>
  
  <p>And here is my code behind (Which never gets called)</p>
  
  <pre><code>Sub row_selected()
      Dim id as String = ASPxGridView1.SelectedRow.Item(0).ToString
      Response.Redirect("Customers.aspx?ID=" &amp; id) 
  End Sub
  </code></pre>
  
  <p>How can I call a function from code behind by clicking on a row on ASPxGridView row?</p>