title: ASPXGridView ClientSideEvents How to Get Selected Row's KeyField Value
body: <p>I'm trying to get selected grid rows KeyField value on client side;</p>
  
  <p>I used to try followings and get various results:</p>
  
  <h1>Method #1</h1>
  
  <pre><code>&lt;ClientSideEvents RowClick="function(s, e) {var key= grid.GetSelectedKeysOnPage()[0];}" /&gt;
  //This gives previous selected rows value everytime
  </code></pre>
  
  <h1>Method #2</h1>
  
  <pre><code>&lt;ClientSideEvents RowClick="function(s, e) { grid.GetRowValues(grid.GetFocusedRowIndex(), 'MyKeyFieldName', OnGetRowValues); }" /&gt;
  //This gives previous selected row and also gives an error: "A primary key field specified via the KeyFieldName property is not found in the underlying data source. Make sure.. blabla" But the MyKeyFieldName is true and i dont want to make a callback, i dont want to use this method!
  </code></pre>
  
  <h1>Method #3</h1>
  
  <pre><code>&lt;ClientSideEvents RowClick="function(s, e) { grid.GetRowValues(e.visibleIndex, 'MyKeyFieldName', OnGetRowValues); }"&gt;
  //This gives the same result with Method #2
  </code></pre>
  
  <p>The question is: How can i gather KeyField Value of (not previous but) current selected row  at client RowClick event without a callback or postback?</p>