Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8095179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:02:12+00:00 2026-06-05T21:02:12+00:00

I already did my studies, I know how to make a custom formatter, or

  • 0

I already did my studies, I know how to make a custom formatter, or editor and how to use it.
My problem is, I am unable to set up, or use a formatter.
My structure:

The jQuery includes:

    <script type="text/javascript" src="jquery-1.7.2.min.js"></script>


    <script type="text/javascript" src="jquery.event.drag-2.2.js"></script>
    <script type="text/javascript" src="slick.core.js"></script>
    <script type="text/javascript" src="slick.editors.js"></script>
    <script type="text/javascript" src="slick.formatters.js"></script>
    <script type="text/javascript" src="slick.grid.js"></script>

Everything is unedited above.
The code implementing the grid:

                        var grid; var cols; var rows; var options = {
                            enableCellNavigation: true,
                            enableColumnReorder: false,
                            forceFitColumns: true
                        };
*rows and cols come from server side via JSON.parse*
grid = new Slick.Grid("#results", rows, cols, options);

The code, which comes from the server and fills up the rows and cols variable is basically this:

            cols:
            echo json_encode('[
                    {"id":"price",      "name":"Ár",                "field":"price"},
                    {"id":"location",   "name":"Elhelyezkedés",     "field":"location"},
                    {"id":"egyeb",      "name":"Lófasz",            "field":"egyeb"},
                    {"id":"pic",        "name":"Képek",             "field":"pic", "formatter":"Slick.Formatters.PercentComplete"}
                ]');
            rows:
            echo json_encode('[
                    {"price": "5", "location":"AlsóBélaCsecselény",     "egyeb":"lófasz",   "pic":"1",  "link":"ezittahelye"},
                    {"price": "6", "location":"qrsóBéqrcselény",        "egyeb":"lófasz",   "pic":"2",  "link":"ezittahelye"},
                    {"price": "7", "location":"AlsóBélaqwqwrelény",     "egyeb":"lófasz",   "pic":"3",  "link":"ezittahelye"},
                    {"price": "8", "location":"qwrCsecselény",          "egyeb":"lófasz",   "pic":"4",  "link":"ezittahelye"}
                ]');

Everything works fine, when the pic column does not have a formatter, and the grid works with extra properties for the columns as well, such as a mistyped “formatter” tag(like “fformatter” or whatever),

but the Javascript gives me the following error every time the JSON code has a “formatter” property:

Uncaught exception: TypeError: ‘getFormatter(row, m)’ is not a function

every damn time I try to load the table, the formatters mess up everything and I don’t know what to do next! I tried to track back the bug, and it lead me to the 1124. line of the source code of slick.grid.js, this function somehow breaks everything with the return statement..

function getFormatter(row, column) {
  var rowMetadata = data.getItemMetadata && data.getItemMetadata(row);

  // look up by id, then index
  var columnOverrides = rowMetadata &&
      rowMetadata.columns &&
      (rowMetadata.columns[column.id] || rowMetadata.columns[getColumnIndex(column.id)]);

  return (columnOverrides && columnOverrides.formatter) ||
      (rowMetadata && rowMetadata.formatter) ||
      column.formatter ||
      (options.formatterFactory && options.formatterFactory.getFormatter(column)) ||
      options.defaultFormatter;
}

Any help would be appreciated!

Edit: Here’s how I get the the code from the server:

                            $.post( "queries.php?event=search&&phase=columns", $("#full_search").serialize(), function(data){
                                    cols = JSON.parse(data);
                                    alert(cols[1].id);
                                    $.post( "queries.php?event=search&&phase=rows", $("#full_search").serialize(), function(data){
                                        rows = JSON.parse(data);
                                        alert(rows[1].link);
                                        grid = new Slick.Grid("#results", rows, cols, options);
                                        alert(grid.getData().length);
                                        return false;
                                    },"json");
                                return false;
                            },"json");
                            },"json");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:02:14+00:00Added an answer on June 5, 2026 at 9:02 pm

    Slick.Formatters.PercentComplete shouldn’t be a string. It’s a function (class constructor) defined in slick.formatters.js.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did actually someone make already a tutorial that shows how to customize an UITableView?
I know I already did it, it is somewhere in the backend... but can't
this is a homework which I already did, I just need either confirmation if
I'm trying to install WF with VS2008E. That's what I already did: Go to
I have read some threads regarding this and I did already take steps to
There are already a couple of questions on finding cycles, but I did not
i have already finished code to passing data to url , and it did
Already found this page with some helpful hints. Problem is I need to debug
I already did some search here on SO, on this , this , this
I need to update a certain row in table, already did validators to assure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.