public int getLineLength(int row) {
        int count = 0;
        while (count < grid[row].length) {
            if (grid[row][count].getCharacter() == 0x0a
                    || grid[row][count].getCharacter() == DataGridCel.NullChar) {
                break;
            }
            count++;
        }
        return count;
    }