I need to edit a parent-child relation in a datagrid. I populated the datagrid with a SQL command like this:<br>
<br>
SELECT bills.bill_no, bills.value, <br>
bills.client_no, clients.client_name<br>
FROM bills, clients<br>
WHERE bills.client_no = clients.client_no<br>
<br>
I want the user modify the fields: bills.value and bills.client_no. When the user change the client_no I trigger a method to show the corresponding name in clients.client_name in the datagrid.<br>
<br>
Until here it works fine but when the datagrid tries to update the data it brings an error 'cos it tries to update the clients.clientname field too, and this is in the parent file.<br>
<br>
How should I do this?
<br>
SELECT bills.bill_no, bills.value, <br>
bills.client_no, clients.client_name<br>
FROM bills, clients<br>
WHERE bills.client_no = clients.client_no<br>
<br>
I want the user modify the fields: bills.value and bills.client_no. When the user change the client_no I trigger a method to show the corresponding name in clients.client_name in the datagrid.<br>
<br>
Until here it works fine but when the datagrid tries to update the data it brings an error 'cos it tries to update the clients.clientname field too, and this is in the parent file.<br>
<br>
How should I do this?