The tablecontrol is initialized using the registerColumns method. It takes an array of column specifications (left to right). Each column can have a custom compare function associated with it, simply replace/modify this with the compare function you need. Compare functions take two params and return -1, 0 or +1 for less than, equal, and greater than respectively. See for example GateUser.js compareUsernameNoCase. The initial column to sort on is specified with TableControl::m_currColSortIndex.