Welcome Guest, Not a member yet? Register   Sign In
Problem with cache data
#6

Oh, I see. So you want to retain the incremented row number. It sounds like you are numbering the rows automatically with a counter and incrementing the counter for each row.

Instead you could use the ID for the row you are displaying, that will never change, but then your table will not be numbered from 1, and would look strange. If it is just a counter though it is right that it always starts from one, or after a search you will get 3 gggg, 12 thfhs, 24 fsdfsdf etc, which will also look strange.

You could just output #1 in that column indicating it is just a row number, or have at the top of the table 'Displaying 1-24 or 24 results, which would make the idea that the column is just counting more obvious. You cannot have it both ways, either it is a reference number to the row, so will not be 1,2,3,4, or it is not a reference in which case it will always start at 1.

The only other way is to download the entire table on first go, but when a search is done, do it via js that then just sets the unwanted rows to display:none, which would hide the unwanted results. Your javascript would work it's way through the table row by row, taking the search field content, doing a search match test, hiding the row if no match found. You could then add a button to clear the search filter, which would be another JS function to remove all the diplay:none stylings or classes. That might work nicely as two searches in a row would mean the second search is a search on the current displayed search results, so you could slowly refine your search if you have a lot of data.

Hope that helps in some way,

Best wishes,

Paul.
Reply


Messages In This Thread
Problem with cache data - by StratoKyke - 08-30-2016, 04:38 AM
RE: Problem with cache data - by StratoKyke - 08-30-2016, 11:22 AM
RE: Problem with cache data - by StratoKyke - 08-31-2016, 04:13 AM
RE: Problem with cache data - by PaulD - 08-31-2016, 04:23 AM
RE: Problem with cache data - by StratoKyke - 08-31-2016, 04:31 AM
RE: Problem with cache data - by PaulD - 08-31-2016, 04:51 AM
RE: Problem with cache data - by StratoKyke - 08-31-2016, 05:02 AM
RE: Problem with cache data - by PaulD - 08-31-2016, 06:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB