master-detail

Questionsmaster-detail
peter mostmans asked 12 years ago

Hello,

I'm testing the master-detail grid of your 'demos' section. So, first of all I used the database.sql script in order to have the db tables to get the demo working.

The result is two nice grids that are interacting fine 🙂

The next thing I did, was selecting a record in the master table resulting in the corresponding records in the detail table, which is still fine.

I was curious what would happen if I tried to change the 'Id' of one of the detail records. So, clicked 'Edit' and changed the 'Id' to some other number.
When pressing 'Enter', the 'Id' number changed to it's original value again, which I think is a good thing because changing key values never is a good idea.

The problem is, when I'm trying to do this with two of my own tables, who look pretty much identical to the 'clients' and 'invheader' tables, the grid is not preventing me from changing the PK. The only difference I see between
the invheader table and my own detail table is that the name of my PK is not 'id' like yours but 'idinschr_kombinatie'. Could that explain the issue I'm having ? If so, that would mean the PK of the detail table has to be 'id' in order to work properly.

1 Answers
Abu Ghufran answered 12 years ago

You can restrict the id column as non editable by editable => false,
it would work as you expect.

Changing to default value, with no intimation of message could be an issue in build, which i will recheck.

Thanks

Your Answer

5 + 7 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?