gprabaka Posted November 29, 2006 Posted November 29, 2006 I have a datagridview on a Windows form. The first 2 columns are the key fields for the table in the database, so I have have them formatted on the grid as ReadOnly. However, I need to make them editable when adding a new row. Can someone advise me as to how this can be done. Thanks Guha Quote
tfowler Posted November 30, 2006 Posted November 30, 2006 I don't think you really want to do that, do you? You shouldn't allow the user to edit the "key" fields. The "key" fields should only be changed through communication with the database, or in the DataTable through code that you write. Todd Quote
gprabaka Posted December 1, 2006 Author Posted December 1, 2006 Well, It is not a key field like an ID. However it does need to be populated. For example if we have table like Customer and a table Order. The Order while populating the Order table we will need to populate the Customer# as the foreign key. The would have to be a user selected/entered field. Thanks Guha Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.