Alternative to Editable Grid on Master/Detail

Hi,

I know in Master/Detail, is not possible to have a New button in detail using grid application, but for my requeriments, I need (and I don’t like Editable Grid) to show as Grid, and add new lines on modal, and update detail and master fields.

What is best approach for this? A “New Detail LIne” calling a form, and how to uipdate detail on finish? and so on…

Keyword header (Value)!
I’m pretty sure you’ll figure it out. :slight_smile:

onScriptInit

$link = “…/form_position/form_position.php?v_rch_id=”.[glo_rch_id]."&rpos_id=0";

[header_button] = “<button type=‘button’ class=‘scButton_default’ onclick=“parent.window.tb_show(’’, '”.$link.”&nmgp_url_saida=modal&nmgp_outra_jan=true&TB_iframe=true&height=160&width=750&modal=true’, ‘’);
“>New Position</button>”;

onAfterInsert of the form:

echo “<script>parent.frames[‘nmsc_iframe_liga_nameofgrid’].window.location.href += ‘’’; window.parent.tb_remove();</script>”;

jsb

Hello

I would create a php button in the master form to redirect to the detail form on modal, so you don’t have to customize your code 2 much.

Regards

[QUOTE=jsbinca;32367]Keyword header (Value)!
I’m pretty sure you’ll figure it out. :slight_smile:

onScriptInit

$link = “…/form_position/form_position.php?v_rch_id=”.[glo_rch_id]."&rpos_id=0";

[header_button] = “<button type=‘button’ class=‘scButton_default’ onclick=“parent.window.tb_show(’’, '”.$link.”&nmgp_url_saida=modal&nmgp_outra_jan=true&TB_iframe=true&height=160&width=750&modal=true’, ‘’);
“>New Position</button>”;

onAfterInsert of the form:

echo “<script>parent.frames[‘nmsc_iframe_liga_nameofgrid’].window.location.href += ‘’’; window.parent.tb_remove();</script>”;

jsb[/QUOTE]

Sounds interesting JSB. But, how is suppose I will show this button?

Alter or create a header template without any lines, background and so forth on it. Just a field.
Go to Layout, chose the header template, set ‘Display Header’ to Yes, select Value for the Header Variables and fill in [header_button]. :slight_smile:

jsb

I think I didn’t get it at all.

Form is opened but not in new mode, and when inserted I get a Not Found error.
I basically copy/pasted and changed url, didn’t had time to check the code.

Don’t know either, why I can’t get pencil/edit icon work. It just not appears.

JSB, has you some sample to see it working and how is done? I got a lot of problems trying to replicate the way you suggested, and I hate a lot editable grids.

I just want a detail grid, and a “modal” form to add new detail records :frowning: