Page 1 of 1
sELECTED ROW upon entry of an application
Posted: Thu Jun 20, 2013 10:17 am
by leatherlips
This is probably a silly question, but if I have a grid (loaded as a subfile in the rpg), I want to highlight (select) a particular row immediately prior to displaying the record format. I tried just setting the SFLRRN to the corresponding Row I want selected, but it did not highlight that row when displayed.
How is this done?
Re: sELECTED ROW upon entry of an application
Posted: Thu Jun 20, 2013 11:19 am
by Scott Klement
Are you referring to our "row selection" feature? If so, you can bind a field to the "selection field" property of your subfile.
"selection field" should be an indicator, and you will have a separate value for each row in the subfile. If you want a row to be selected, turn on that indicator when writing/updating a subfile record. You can also check this field when reading the subfile to see which ones the user selected with the mouse.
Does that help?
Re: sELECTED ROW upon entry of an application
Posted: Thu Jun 20, 2013 12:18 pm
by leatherlips
Thanks Scott, I think I understand.
So, by binding an indicator to the Selection Field property, as I load the SFL, I could simply set the indicator to *ON for the row I want to be selected when the subfile displays? For instance, I if the data in the 4th subfile record was what I wanted to be selected when the record format was displayed, I'd simply have the indicator value *OFF for the first three records loaded, then turn it on right before writing the 4th record, and off again for the balance of the records loaded into the subfile.
That sure would make it easy!.
Thanks!
Re: sELECTED ROW upon entry of an application
Posted: Thu Jun 20, 2013 12:27 pm
by Scott Klement
Yes, that's the idea. Let me know if it works for you!