What is the best practice for using a grid with a domain object that has an auto-generated primary key?
Setting the column to read-only or editable=false doesn't work because the field is still rendered.
In my case I am using NHibernate, and the primary key needs to be passed as NULL to create a new record.
Because the grid is expecting the primary key to be required, it will not allow a 'new item' form to be submitted unless the field has a value.
But if the field has a value, then NHibernate tries to update a record based on the primary key entered.
So as a workaround, I use a nullable int as the type for the primary key.
I feel there is a better way...
Anyone have a better idea?