Grain refinement through fragmentation of dendrites in undercooled melts