Welcome, Guest
Please Login or Register.    Lost Password?

Do not display records on startup
(1 viewing) (1) Guest
Welcome to the ToolsJX forum!


Go to bottomPage: 1
TOPIC: Do not display records on startup
#548
Do not display records on startup 3 Months, 1 Week ago Karma: 0
Hi. I'm wanting to use Table JX to allow my visitors to search records in a table. However, I don't want them to be able to freely view all the records. I would like to not display any records at all when the grid is loaded, and only show records based on the visitor's search criteria.

The reason for this is because there is other user's data in the table. I don't want to limit it to only the current visitor's data (which I know I can restrict based on their account as a registered user) because they may need to be able to search for a friend's info as well. But I don't want all the records to be put out there just for the heck of it. Basically, if they know what they are looking for, I want it to be displayed.

Is this possible?

Thanks!
jdowns1
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#550
Re:Do not display records on startup 3 Months, 1 Week ago Karma: 1
Hi,

It is possible but you will have to change the code.

One simple hack would be to set search field to value that is for sure not in any database, some GUID or something, that cannot be found. This is very ugly but simple solution.
You will also have header displayed all the time and also label "No records found".

Another solution would be not to go on DB until search button is clicked. You will have to hide header and label "No records found". This solution takes more time to be accomplished.

Best regards,
Viljem
viljem
Admin
Posts: 153
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#551
Re:Do not display records on startup 3 Months, 1 Week ago Karma: 0
Thanks for your suggestions. I'll give it a try.
jdowns1
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting