Hi,
I'm building a grid using the ASP.NET helpers, but that's unrelevant.
I'm performing CRUD operation over a DB where some tables starts with ID 0. As a result, I'm forced to set the DefaultValue for that column to -1, because the other numbers may be used for the table rows.
But actually for everytime the user wants to perform an insertion, i don't want to show the ugly "-1" as ID default value, but i would like to set the first available number or otherwise zero.
Is there a way to associate a function to return the defaultValue or to anyway change the default value in an elegant way?
Thanks
I'm building a grid using the ASP.NET helpers, but that's unrelevant.
I'm performing CRUD operation over a DB where some tables starts with ID 0. As a result, I'm forced to set the DefaultValue for that column to -1, because the other numbers may be used for the table rows.
But actually for everytime the user wants to perform an insertion, i don't want to show the ugly "-1" as ID default value, but i would like to set the first available number or otherwise zero.
Is there a way to associate a function to return the defaultValue or to anyway change the default value in an elegant way?
Thanks