This topic is locked

'Add'Button in Master Grid opens popup editor in Slave

11/23/2020 1:52:10 PM
PHPRunner General questions
C
ckranich authorDevClub member

Hi,
Is there any way to remote control the opening of the edit popup (just like clicking on the pencil in slave grid)
I tried in 'client After' Event of Button (in Master Grid), but no success.

Note: Master and Slave Grids are both in a Dashboard.
Greetings,

ckranich

C
ckranich authorDevClub member 11/23/2020



Take a look at this:

https://xlinesoft.com/phprunner/docs/how_to_control_inline_add_edit_functionality_from_script.htm


Thank you.

I tried all that examples before. - nothing happens here.

how can I debug this? what could go wrong?

both grids are displayed on a dashboard. could this be a problem?
ck.

C
ckranich authorDevClub member 11/23/2020



Thank you.

I tried all that examples before. - nothing happens here.

how can I debug this? what could go wrong?

both grids are displayed on a dashboard. could this be a problem?
ck.


Further info:

I had to add a location.reload(); into the ClientAfter of my "Add Record" Button.

Without that I had to press F5 to make new record visible

admin 11/23/2020

It is really hard to decipher any of this. How is 'Add Record' is relevant here if you were previously talking about 'Edit Popup'?

C
ckranich authorDevClub member 11/24/2020



It is really hard to decipher any of this. How is 'Add Record' is relevant here if you were previously talking about 'Edit Popup'?


Hi Sergey,
Sorry for bad English and bad description :-0

I Try again:
I have two tables (renamed here for better understandability)

  1. Order Table (Master)
  2. Item Table (Detail)
    Both are linked(filtered) by a common field (lets say its customer)

    in the Master Grid (list view) there is an "Add Item" button (shown/hidden on condition).

    This adds a record to a specific order and preloads several fields.

    the new item then shows up in the gridview of Detail Table

    (In the past this did not refresh automatically, but a location.reload in the Client After of the button fixed it)
    Normal operation:
  3. Add Item by clicking on "Add Button" in Master(Order) Grid.
  4. click on the edit icon in Detail (Item) to bring up the editor in a popup window.
    What Customer wants:

    Save one click: After adding the record in Detail (Item) by clicking on Button in Master Grid

    the Editor shall open automatically (saving 2nd Click)
    What I have tried sofar

  • Redirecting to Edit page (this brings up full screen editor, not in popup dialog)
  • Trying to fire editor in Client After of Button, OnLoad of List of Detail Table according to

    examples in documentation (for example this:

// get the list of record IDs

var recsId = pageObj.inlineEdit.getRecsId();



// click the inline edit link

pageObj.inlineEdit.editRecById(recsId[X]);


Kind Greetings,

ckranich