This topic is locked

Inline edition : refresh detail panel

3/8/2010 11:49:24 AM
PHPRunner General questions
B
BenjaminJ author

Hello,
I use "inline edition of details in a master list page".

The order of the detail lines is very important in my case so I need a way for the users to re-order the lines of detail.
In the database, I created a column which contains a different number for each line.

I added two buttons to the list page of the detailed rows : "Move-up selected" and "Move-down selected".

When you access this page via the master table list, these buttons appear "inline" near by the [Add new], [Edit selected] & [Delete selected].
The server code of these two buttons updates the database and works well, but after this, I would like the detail rows to be refreshed (=re-sorted).

I cannot refresh the whole page because it closes the "inline detail panel".

Is there a javascript code that I can insert in the "Client After" event of each button to refresh the detail lines?
It should be possible since this subpart of the page is already refreshed when you delete a line.

So I think I just need the part of code used there.

I see in the source code, some functions like "dpInline1.showDPInline" but I don't get anywhere...
Any help appreciated...

Benjamin.

B
BenjaminJ author 3/11/2010

Simply asked, the question is :
"how to refresh the part of the _list page that contains the lines of detail?"
Any answer?

G
garethpDevClub member 3/15/2010

Been watching this topic - can this be done?

J
Jane 3/17/2010

Hi,
unfortunately there is no refresh method for the detail preview. You can only re-create this preview. Here is just a sample code:

dpInline1.showDPInline('states',5,$('#states_preview5')); return false;



where 1 is id of the master page, 5 is id of the record.

B
BenjaminJ author 3/18/2010

Thanks for your reply.
I would like to test this sample code but I don't know how to get the id's within the javascript code "Client After" of the button.

Indeed, I would like this code to be executed after the server side code of the button is executed.
Are those id's accessible somewhere or do we need to pass them as parameters or is there another solution?

J
Jane 3/19/2010

Hi,
yes you need to pass id values to your button.

Edit generated files for this purpose. In general you need to check where inpline preview is opened and save id of current record here.

Unfortunately we don't have a ready to go solution for this.