telmiger
Posts: 61
|
| Posted: 11/11/2004, 1:13 PM |
|
I populate the editable grid from a table that contains default data.
The editable grid also has a search/filter form.
When clicking on the submit button of the editable grid I would like it to insert all filtered data into a new table. ( I will not have to update existing records from this form)
I used the custom insert to speficy the other table but how do I force the editable grid to insert records that normally would only be updated?
Hope this makes sense
Tony Elmiger
|
 |
 |
DonB
|
| Posted: 11/12/2004, 7:33 AM |
|
Might be better to simply code before update/insert/delete events (whatever
suits your needs) to execute a query more or less like:
$db = new clsDBmyconnection;
$db->query("INSERT table2 SELECT * FROM table1 WHERE " . $grid1->ds->Where);
unset($db);
The Where property will tell you what records are "in the grid" (table1) and
the query simply selects those same records from table1 and inserts them in
table2.
You can set the UpdateAllowed, InsertAllowed, DeleteAllowed property of the
grid to false, too, and avoid touching the content of table1 (cancels the
insert/update/delete of grid1.
--
DonB
http://www.gotodon.com/ccbth
"telmiger" <telmiger@forum.codecharge> wrote in message
news:54193d5fd6e74e@news.codecharge.com...
> I populate the editable grid from a table that contains default data.
>
> The editable grid also has a search/filter form.
>
> When clicking on the submit button of the editable grid I would like it to
> insert all filtered data into a new table. ( I will not have to update
existing
> records from this form)
>
> I used the custom insert to speficy the other table but how do I force
the
> editable grid to insert records that normally would only be updated?
>
> Hope this makes sense
>
> Tony Elmiger
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|