Я пытаюсь получить выбранные строки сетки значения KeyField на стороне клиента;
Раньше я пробовал следующее и получал различные результаты:
Метод № 1
<ClientSideEvents RowClick="function(s, e) {var key= grid.GetSelectedKeysOnPage()[0];}" />
//This gives previous selected rows value everytime
Метод № 2
<ClientSideEvents RowClick="function(s, e) { grid.GetRowValues(grid.GetFocusedRowIndex(), 'MyKeyFieldName', OnGetRowValues); }" />
//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!
Метод № 3
<ClientSideEvents RowClick="function(s, e) { grid.GetRowValues(e.visibleIndex, 'MyKeyFieldName', OnGetRowValues); }">
//This gives the same result with Method #2
Вопрос: как я могу собрать значение KeyField (не предыдущей, но) текущей выбранной строки на клиентском событии RowClick без обратного вызова или обратной передачи?