Attached are two files. Working.txt will sort the first column in the DataGrid automatically.
The second file, NotWorking.txt, will not sort automatically for some reason. This file is a modify sample "Zoom to Found Features". Line 30 the test.dispatchEvent has been added and to the ID to DataGrid "test". I am not getting any errors but I am unable to determine why it's not working.
Any help would be appreciated.