-3

Good Day!, Can anyone here give me a hint or idea on how to get the rownumber of specific value in datawindow.

i have 2 objects, treeview and datawindow with same Value. Treeview data are sorted but in datawindow is not. when i click an item in Treeview it will show the rownumber in datawindow correspond to value clicked in treeview. How can i do that?

Best regards, Newnbie

P.S Sorry for my English

Viriles
  • 11
  • 1
  • 3

1 Answers1

2

I would use dw.Find(*). Code example:

long ll_row
string ls_keyValue, ls_dwSearch

// Read value from TreeView
ls_keyValue = '...'

// "MyKey" :: Column in DataWindow containing the key read from tree view
ls_dwSearch = "MyKey = '" + ls_keyValue + "'"
ll_row = dw_data.Find(ls_dwSearch, 1, dw_data.RowCount( ))

if ll_row > 0 then
   // Key value found => Make row current and visible
   dw_data.ScrollToRow(ll_row)
end if
MicKr-
  • 186
  • 3