Datasheet - Sort

I didn’t need this sorting code if we never loose custom sorting created into live DB mode! I don’t understand because in Live Edit DB the sorting is still there but refreshing the web page don’t took Live Edit sorting but only LIVE sort !? That make no sense!