This topic is locked

Static Column Headings

9/4/2007 2:33:21 AM
PHPRunner General questions
S
slobbering_dog author

Hi There everyone,
I am hoping there is an easy way to do this -
I have a lot of data to review and quite often I use the 500 lines per page option to display our data. The problem is when I scroll down a few hundred records the headings have long gone and I can't remember (well not easily anyway) which column is which (I have 15 columns) (oh, and 640,00 records).
Is there a way to duplicate / make static, the column headings - I guess I could try to duplicate them using a jpeg in the header.php but I sort of wanted to make this a dynamic feature - ie: when I change the columns for the data table, the static heading change as well.
As you can probably guess I haven't thought this problem the whole way through (ie: having duplicate headings at the top of the first page etc) , but any suggestions at all would be really appreciated.
Also,
has there been any more thought to having a switch to turn off ajax for the search suggestion stuff - I manually insert the $useajax =false; into my pages but it would be good to have a flag of some sort in the setup of a project to turn it off for ever.
Best regards,
slobbering_dog (slurp, slurp) <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=6168&image=1&table=forumtopics' class='bbc_emoticon' alt=':P' />

Alexey admin 9/6/2007

Hi,
you can insert column headings after each 20-30 records in your table.

Here is how to do that.

  1. Open your List page in Visual Editor, set cursor to table header and switch to HTML mode.
  2. Locate and copy to clipboard whole table header.

    It begins with <TR> tag and ends with </TR>.
  3. Find this element in HTML code:
    <!--{foreach from=$rowinfo item=row}-->

and insert this one just after:

<!--{if $row.showheader}-->



then insert your header code from clipboard

then this code:

<!--{/if}-->

  1. Proceed to Eventstab, insert this code to List page:Before processevent:
    global $myrowcount;

    $myrowcount=0;



5. Insert this code to List page: After record processedevent:

global $myrowcount;

$myrowcount++;

if($myrowcount%30)

$row["showheader"]=false;

else

$row["showheader"]=true;


We'll add Ajax on/off switches to the next version of PHPRunner wizard.