Back

Table Rows and Columns
keyRecNoSelect
Selected record is based on primary key and not relative position in grid Default: `0` 0 = Show record based on relative record number in details. If no record found, show first row. 1 = Show record based on selected primary key in details, if no record found then hide details. 2 = Show only record based on selected primary key in details, if no record found then show first row in details. Previously we highlight records based on record number. This caused problems when we want to show the same record in the details all the time because as records get added/deleted, the record number would point to a different record. When keyRecNoSelect is set to 1, the same record is always selected as record selection is by primary key and not relative position in the recordset. When set to 0 (the default), the record selected is based on the relative position from the beginning of the recordset. So if records are added to the beginning of the recordset (or deleted), a different record could be selected. T On the first time a phpLens object is displayed, no record will be selected if keyRecNoSelect = 1, while if set to keyRecNoSelect=2, the first record will be auto-selected. GET parameters The required URL variables in your GET parameters becomes: lens_no_mysql=0&p=$key where the $recno is the record number you want to go to (it is ignored), and $key is the urlencoded primary key to select and display in the details. Syntax `$lens->keyRecNoSelect = 1; // select by primary key` Basic:Yes Advanced/Enterprise:Yes DynamicEdit:No [Version 2.8.1]