Beginner Question - Gii, GridView, Default Sort Order

Quite green to Yii but have successfully installed and created a basic web page using Gii and CRUD generation and made some minor updates. Now I simply want the default sort for the page to show by ID Descending rather than the current default of Ascending. I’ve viewed quite a few related posts and made several attempts, tried to debug with var_dump on various objects, but I just can’t seem to get it right. Certainly someone has an easy solution using the a any basic Gii created pages.

Thanks in advance!

Okay, I found one way to do it via the Nav menu:

echo Nav::widget([

     'items' => [

         ['label' => 'Races', 'url' => ['race/index', 'sort'=>'-id'],


But that’s really a hack and just works for the menu link, not the default behavior.