TonyO
Posts: 6
|
| Posted: 02/17/2006, 2:56 PM |
|
I have an editable grid that requires fields pulled from two tables. Category and Category Description. I've added a join for category_id fields but when I test it I get an error to say that update and insert etc not allowed in Editable grid. If I delete the join the error disappears but I can' t update the grid because data is missing from the grid.
Any help appreciated.
Kind regards
Tony
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/17/2006, 3:13 PM |
|
The grid's Custom Update/Insert/Delete properties are available specifically for this scenario.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
roeya
Posts: 181
|
| Posted: 02/22/2006, 10:37 PM |
|
Quote peterr:
The grid's Custom Update/Insert/Delete properties are available specifically for this scenario.
Well not exactly - Custom Update/Insert enable you only to update on and one table, Now you can update one table and for the other you must add custom code and handle it manually, I wish I would have been possible to do Custom Update/Insert /Delete on more then one table
_________________
http://www.infoneto.com/ |
 |
 |
peterr
Posts: 5971
|
| Posted: 02/22/2006, 11:32 PM |
|
roeya,
Sorry, I was answering the original question above: "I have an editable grid that requires fields pulled from two tables". I believe that there was no need to update both Category and Category Description tables.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
roeya
Posts: 181
|
| Posted: 02/23/2006, 12:41 AM |
|
peterr,
Sorry if I miss understood - I found your post and tried to use it to solve my multi-table editable grid, it helped me only half way, though it may help others that require multi-table display, but only single table update editable grid.
_________________
http://www.infoneto.com/ |
 |
 |
TonyO
Posts: 6
|
| Posted: 02/23/2006, 2:13 AM |
|
Peterr, I did as you suggested but then my update buttons disappeared.
I tried following the example in the Help file but without success.
Is there a working example available to see this in action.
After reading roeya's input I guess yes I do need to update two tables from one grid.
My Category table consists of cat_id parent_id sort_id.
My Cat Desc table consists of cat_id cat_name cat_link cat_desc cat_detail.
I'm trying to recreate the menu example in the example pack so that when I add a new menu item it updates the Cat_desc table aswell.
|
 |
 |
redstorm
Posts: 7
|
| Posted: 02/23/2006, 2:29 AM |
|
I have the same issue.
Is there a tutorial on joining tables in either an editable grid or alternatively records builder. I need to populate 5 different tables from the one input screen.
I need multi-table display with multi-table update from one screen!
I have setup what I believed to be correct however I get the following message:
Warning:Insert is allowed for EditableGrid workers_statuses_manageme. Unable to build Insert based on the current Datasource settings (joins, SP or custom SQL). Change the Allow Insert property to disable Insert or specify Custom Insert.
Thanks
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/23/2006, 2:49 AM |
|
TonyO,
OK, in such case you would need to use custom code for updating additional tables. However, I would first focus on resolving the first issue and getting one table update working automatically. Custom Update is used to update one of the tables when you pull data from multiple tables. Unfortunately I don't recall if any of available examples uses Custom Update, though such example may be too simple anyway since it's just one property and it always works except when something may be misconfigured.. I just configured Custom Update and I see the "Submit" button on my page.
We may need more information about your issue. You mentioned that you are expecting "Update buttons"? Do you see the "Submit" button? And do you see any error messages or warnings in CCS "Messages" panel? And which table did you select in the Custom Update property dialog?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 02/23/2006, 3:17 AM |
|
redstorm,
Your warning means that everything is OK if you only need to implement "multi-table update from one screen". In such case you can disable the Allow Insert property like the warning states. Or if you need to insert data as well then you may need to review your Custom Insert property configuration, test several configurations, or describe how you configured this property.
Tutorial: select 2 related tables as the Data Source of your form (using Visual Query Builder), open up the "Custom Update" property and select one of the tables that you want to update. Repeat the same for "Custom Insert" and "Custom Delete". That's it. Other details may depend on individual implementation.
Multi-table updates are not supported in CCS therefore custom code would be needed to update additional table(s). There is similar code used in "Many-to-Many" examples in CCS Example Pack, which may be useful in this case. There are also custom code examples in the documentation (like "Execute Custom SQL".)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |