Hi,
is it possible to copy a record, including all it's child records from another table, if any?
If yes, how to do it?
Thanks, snookie.
Hi,
is it possible to copy a record, including all it's child records from another table, if any?
If yes, how to do it?
Thanks, snookie.
If copy, there is key in the URL, e.g. <Table>add.asp?showdetail=&<key>=<value>.
hi,
the ew_Get("ID") did not work for me in the Row_Inserted event.... it was always empty when copying or cloning a record.
I don't know why.
Instead I used the following code to define whether it was an 'add' or 'copy' event, and this worked for me: (VB)
Public Overrides Sub Row_Inserted(rsold As OrderedDictionary, rsnew As OrderedDictionary)
.....
if rsold is Nothing then
tmp_action = "add"
else
tmp_action = "copy"
end if
To resolve this issue, follow these steps
At the server events ListOptions_Load include:
var opt = ListOptions.Add("copy");
opt.Header = "";
opt.OnLeft = true; // Link on left
At the server events ListOptions_Rendered include:
Body = "<a href='xxxadd.cshtml?showdetail=detailtable&ID=" + key.CurrentValue + "' title='Copy'>";
Body = Body + "<span class='icon-copy ewIcon' data-caption='Copy'></span></a>";
ListOptions["copy"].Body = Body ;