Page 1 of 1

About "Allow Add"

Posted: Fri Oct 04, 2013 2:25 am
by skymark

I have a master/detail adding page. For the detail table "item", I checked "Allow Add" for one field. The "Add item" link doesn't appear on the detail rows. Is there a way to make it appear there?


Re: About "Allow Add"

Posted: Sat Oct 05, 2013 9:17 am
by mobhar

I don't think so, since the detail section is displayed in "Table" (tabular) style, and not in the "Form" style.

You can only display such "Add item" link when the Add page is being displayed individually (not in a Master/Detail style).


Re: About "Allow Add"

Posted: Sat Oct 05, 2013 9:31 am
by Webmaster

Copy the link from the Add/Edit page and insert into the List page at where you want. You can use Startup Script (see Server Events and Client Scripts in the help file) and use jQuery, e.g. (v10)

$("<a ...>Add xxx</a>").insertBefore("Your selector"); // or use insertAfter()

Also read: http://api.jquery.com/category/manipula ... n-outside/


Re: About "Allow Add"

Posted: Tue Oct 08, 2013 12:59 am
by skymark

Thank you all.

I need to have a link exactly the same as the one on the individual add/edit pages, i.e. when users click on "Add item", it will pop up a page to allow users to add an item, and after adding, the combo box next to the link should make the newly added item to be selected automatically. Other combo boxes on the detail rows should have the newly added item on their lists. When users hit "add blank row", the new detail row should show the "Add item" link after the combo box of "Item". Is there a way to do it?


Re: About "Allow Add"

Posted: Tue Oct 08, 2013 9:48 am
by danielc

The adoption link is triggered by on click event to start js function, ew_AddOptDialogShow. You need to use jQuery to add the link to the appropriate position like Wedmaster say. You can reference to demo project cars table trademark field in edit/add page to see what need to put into the link and what parameter to put into ew_AddOptDialogShow function.