wtorek, 22 stycznia 2008

How to remove primary key column in DataTable

Sometimes you need to drop column from DataTable which is marked as PrimaryKey (else you will get an exception). There's a nice way to accomplish that.

DataTable.PrimaryKey = null;

So simple, so nice :)

1 komentarz:

Kristian pisze...

Just what I needed. Thanks.