DataTable dt = new DataTable(); DataColumn id = new DataColumn("Id"); id.AutoIncrement = true; id.AutoIncrementSeed = 1; id.AutoIncrementStep = 1; dt.Columns.Add(id);