1 (edited by joshuA 2021-07-25 21:25:38)

Topic: Two Tables with editable TableGrid

Hi All,

I have another task that I'm unable to solve.  This seems simple, but I cannot figure out what I'm missing.


The most important part is to add/edit/remove from the second tableGrid without creating extra forms.  I'm able to get that working already.


I had to externally add the data to demonstrate this example.


Could someone offer some advise or direction?


Thanks in advance,
-joshuA

"Energy and persistence conquer all things."

Re: Two Tables with editable TableGrid

Use the ability to edit data in the table itself. The properties of the table in the Editable section are responsible for this - AllowCreate, AllowEdit and AllowDelete.

Визуальное программирование: блог и телеграм-канал.

3 (edited by derek 2021-07-26 20:17:33)

Re: Two Tables with editable TableGrid

Hi,
Not sure if I understand the question totally but it sounds like you're wanting to relate records between two editable grids.
It's more normal (I think!) to use an editable grid for things like look-up data and that's pretty straightforward. 
Linking editable grids is slightly more tricky, mainly when adding a new record in the subordinate (child) grid because you seem to have to manually enter the key of the parent record (although it does make moving a chid record to a different parent very easy).
Anyway, have a look at the attached which might give you some pointers.
Derek.

Post's attachments

Attachment icon linked editable grids.zip 344.69 kb, 230 downloads since 2021-07-26 

4 (edited by joshuA 2021-07-27 22:43:24)

Re: Two Tables with editable TableGrid

k245:

Use the ability to edit data in the table itself. The properties of the table in the Editable section are responsible for this - AllowCreate, AllowEdit and AllowDelete.

I had both tableGrids already using those properties, but thanks for the response.


Derek:

Not sure if I understand the question totally but it sounds like you're wanting to relate records between two editable grids.
It's more normal (I think!) to use an editable grid for things like look-up data and that's pretty straightforward.
Linking editable grids is slightly more tricky, mainly when adding a new record in the subordinate (child) grid because you seem to have to manually enter the key of the parent record (although it does make moving a child record to a different parent very easy).

Sorry about the question- it was not clear at all.  You managed to answer it anyway though.

I'm okay using buttons for the first grid, but the second grid must be on a different form with editable properties.

I couldn't figure out how to get the second grid working after the parent was created in the first grid.  I briefly looked at your example this morning.  Once I examine it closer, I'm sure I can figure out the rest.

Thank you a lot derek!
-joshuA

"Energy and persistence conquer all things."

5 (edited by joshuA 2021-08-06 01:32:39)

Re: Two Tables with editable TableGrid

Hello again,

It has been a week now dabbling with this project.  I have ran into a limitation it seems...

I found a similar post (http://myvisualdatabase.com/forum/viewtopic.php?id=3469) that describes what I was trying to accomplish.

It describes an excel-like interface using the table grid which is not (yet) possible.  Unless someone else has come up with something since then?

I wanted to share the results of what I was able to achieve at this point.

Thanks again to those that offered suggestions.
-joshuA

Post's attachments

Attachment icon trip-details.zip 328.59 kb, 180 downloads since 2021-08-06 

"Energy and persistence conquer all things."