RTC Forums
April 18, 2024, 11:01:40 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Move to data set record  (Read 3132 times)
classic12
Guest
« on: November 22, 2011, 11:35:41 PM »

iOS app

I can use a next / prev button to step through the data set And get the populated strong grid's index to follow. I now need to do the reverse. 


I have a string grid that populates with data from mydataset

I am trying to set the row index on the data set to match the selected index in the string grid. Ie as the grid scrolls or a row is selected in the string grid all the data in the edits are moved accordingly. 
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: November 23, 2011, 12:03:18 AM »

I'm not entirely sure what you mean, but if you are asking how to move directly to a specific row inside a TRtcDataSet without using First/Prior/Next/Last, the answer is to use the "Row" property (zero-indexed, just like RTC arrays, so the first row is actually 0 and not 1).

To check the current row number in a TRtcDatSet, simply read its "Row" property (first record is on Row=0, last record is on Row=RecordCount-1).

To move to a specific row number in a TRtcDataSet, set the its "Row" property to the record number (also using 0 as the first record and so forth).

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.021 seconds with 16 queries.