This topic is locked

change place of masterdetails in listview

6/14/2006 11:32:51 AM
PHPRunner General questions
F
frank author

Hello,

I just clos to finish my application and I want to have the masterdetails links in the listpage not in front of the records. Is it possible to move them to each end of the line?
Hope it's clear what I mean.
Best regards
Frank

D
DoubleDeuce 6/14/2006

I just clos to finish my application and I want to have the masterdetails links in the listpage not in front of the records. Is it possible to move them to each end of the line?

I think this is simlar to what I am also looking for. It is for use in the management of an online game.
I need to display both the Master/Details on the same page, rather than the details being displayed on a separate page after clicking a link to view it. Does anyone know if this is possible?
It would be like multiple nested master detail screens with the individual Customer Information followed by their Orders underneath with the Order Detail underneath each respective Order. Something like this;
Customer (with details across screen in row)
Order #1 (followed by details)

[color=#CCCCFF]........Product #1 (followed by details)

Product #2 (followed by details)
[color=#CCCCFF]...Order #2 (with any details in row)

Product #2 (followed by details)

[color=#CCCCFF]........Product #4 (followed by details)

Product #11 (followed by details)
[color=#CCCCFF]...Order #3 (with any details in row)

Product #1 (followed by details)

[color=#CCCCFF]........Product #2 (followed by details)

........Product #3 (followed by details)

Sergey Kornilov admin 6/14/2006

Frank,
you need to modify generated list page for this purpose specifically functions WriteTableHeader and LoopRS.
Double Deuce,
what you trying to achieve is a bit more complicated. I recommend to create a SQL query that pulls data from both master and detail tables. After that you need to modify LoopRS function to display Order info only when order number changes.
I'll write a short article that explains how to achieve this and put it to our website in couple of days.

F
frank author 6/16/2006

Hello,
sorry I think my describtion was confusing. What I want is in a normal list view PHPRunner create the e.g view link field always on the left hand site of each line. I want to have this field on the right hand site.
See as is:
VIEW datafield1 datafield2 datafield3
Should be:
datafield1 datafield2 datafield3 VIEW
Hope this makes the problem clear and more easy solve.
Thanks for your replies anyway, I think I will use them later in my application.
Regards
Frank

Sergey Kornilov admin 6/16/2006

Frank,
as I mentioned above you need to modify generated list page for this purpose specifically functions WriteTableHeader and LoopRS.
Here are pieces of code that need to be moved:

function WriteTableHeader

...

<TD align=center><img src=images/icon_view.gif></td>

<?php $nColumns++; ?>

...


function loopRs

...

<td align=center>

<a href="##SHORTTABLENAME##_view.php"

onClick="java script:

document.forms.viewform.editid.value = '<?php echo htmlspecialchars(db_addslashes($data[$strKeyField]));?>';

<?php if($strKeyField2) { ?>

document.forms.viewform.editid2.value = '<?php echo htmlspecialchars(db_addslashes($data[$strKeyField2]));?>';

<?php } ?>

<?php if($strKeyField3) { ?>

document.forms.viewform.editid3.value = '<?php echo htmlspecialchars(db_addslashes($data[$strKeyField3]));?>';

<?php } ?>

document.forms.viewform.submit();

return false;" >View</a>

&nbsp;</td>

...