There are several reasons why Extend Volume maybe grayed out in Windows 10 Disk Management, I'll show you one by one.
As the name, Unallocated space is not allocated to any partition. In Windows XP Disk Management, Unallocated can only be used to create new drives, but in Windows 10, it can be used to expand other drive.
A 256GB hard disk cannot be increased to 512GB itselft, so before extending an allocated partition, you must delete or shrink another drive to get Unallocated space. If you right click C drive without deleting or shrinking, of course Extend Volume is unusable.
To most of the computer users, it is common sense, but why Extend Volume is disabled for C drive after shrinking D?
From Microsoft explanation, Extend Volume functionality only works when there is adjacent Unallocated space on the right side. When you shrink drive D with Shrink Volume functionality, Unallocated space is produced on the right side of D, so it is non adjacent to drive C. To show you the truth, I've shrank D with Disk Management in my Windows 10 laptop.
As you see:
In fact, both Shrink and Extend Volume support NTFS partition only, so FAT32 and other types of partitions cannot be extended. To show you the truth, I formatted drive D from NTFS to FAT32. As you see, Extend Volume is grayed out for D drive.
Luckily, the system partition is formatted as NTFS by default when installing Windows, so this issue is just common for data drives.
If your hard disk is MBR style, there would be another reason why Extend Volume greyed out.
As I show you above, you cannot extend a drive by shrinking another one, so some people try to delete the adjacent partition, then disk space of this partition will be converted to Unallocated, so Extend Volume is enabled. It works indeed to GPT disk, but to MBR disk, it depends.
Do NOT delete D to expand C drive if you installed programs or there is Windows service running from D.
As you see, drive D is a Primary partition and original E is Logical. Extend Volume is still disabled for D drive after I deleting the adjacent drive E.
Then why there is such restriction between Primary and Logical partition?
In GPT disk, you can create many partitions and all are Primary. But in MBR disk, you can only create 4 partitions if they are all Primary. Because there are only 4 entries in Master Boot Record, from which Operating System can locate the position of each partition.
To create more that 4 partitions, one of the entry must be assigned to the Extended partition. Extended partition works like a container and all Logical partitions must be created in it.
Unlike Primary partition that will be converted to Unallocated after deleting, disk space of a Logical partition will be converted to Free space after deleting. Free space is still a part in the container (Extended Partition), so it cannot be combined to any Primary partitions.
Likewise, Unallocated space deleted from a Primary partition cannot be combined to any Logical partitions.
It seems a bit complicated, but you can solve this problem easily.
In one word: if there is adjacent Unallocated or Free space on either side, simply combine it to the drive that you want to extend, no matter this drive is NTFS or FAT32, Primary or Logical. If the Unallocated space is nonadjacent, move it and then combine to the drive.
Steps to fix Windows 10 Extend Volume greyed out issue because of Unallocated space is nonadjacent:
Step 1: Download NIUBI Partition Editor, right click drive D and select "Resize/Move Volume", drag middle position rightwards in the pop-up window.
Step 2: Right click drive C and select "Resize/Move Volume" again, drag right border towards right in the pop-up window.
If you have shrank drive D but cannot extend volume E in Disk Management.
Right click E and select "Resize/Move Volume", drag left border leftwards to combine Unallocated space directly.
If there is adjacent Unallocated space, but Windows 10 Extend Volume greyed out because of non-supported FAT32 partition or the restriction between Primary and Logical partition, use Resize/Move Volume feature to combine these space directly (similar with Step 2).
Windows 10 Disk Management has the ability to shrink and extend partition, but because of some inherent limitations, only few partitions can be shrank and extended. This article explains why Extend Volume greyed out in Windows 10 Disk Management and how to solve this problem with ease. If there is adjacent Unallocated on either side, simply combine it with NIUBI Partition Editor. If you cannot extend C drive because Unallocated space is nonadjacent after shrinking D, move the Unallocated space to behind C drive and then combine it.