Can you prevent editing of datagrid column fields
Posted: Fri Sep 14, 2012 2:13 am
Hi All,
This is for my information only at this point.
I am developing a database and using datagrid to display table data. Currently I edit the rows in the datagrid by using a separate card with fields related to the database. I then write the data from that card to the database and update the datagrid.
It's clear that a more sophisticated approach would be to have the user change the data(edit or add new row) in the datagrid fields and then write that row to the database.
I haven't come to grips with how to write the updated or new rows from the datagrid to the database but I am pretty sure that is a straightforward issue, from what I have read in the datagrid manual (http://lessons.runrev.com/s/lessons/m/d ... ata-source). Though if anyone has some example code of how to do that, since the author left that as an exercise for the reader, my lazy self would be most grateful
However, my main question is whether it is possible to restrict which column fields can be edited? I have a datagrid which contains data from two tables in the database. I want the user to be able to edit a limited set of columns as some of the columns have data from the linked table and I don't want them to change that.
cheers
This is for my information only at this point.
I am developing a database and using datagrid to display table data. Currently I edit the rows in the datagrid by using a separate card with fields related to the database. I then write the data from that card to the database and update the datagrid.
It's clear that a more sophisticated approach would be to have the user change the data(edit or add new row) in the datagrid fields and then write that row to the database.
I haven't come to grips with how to write the updated or new rows from the datagrid to the database but I am pretty sure that is a straightforward issue, from what I have read in the datagrid manual (http://lessons.runrev.com/s/lessons/m/d ... ata-source). Though if anyone has some example code of how to do that, since the author left that as an exercise for the reader, my lazy self would be most grateful

However, my main question is whether it is possible to restrict which column fields can be edited? I have a datagrid which contains data from two tables in the database. I want the user to be able to edit a limited set of columns as some of the columns have data from the linked table and I don't want them to change that.
cheers