Move setTextDirAttr to Grid.js