colapseAllGroups doesn't work

when I tried to use mygrid.colapseAllGroups(); it says that it isn’t a function. what is it’s replacement

The corrent command name is
mygrid.collapseAllGroups();