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 8655473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:02:20+00:00 2026-06-12T15:02:20+00:00

I have a slickgird which saves to the database and the calculatons work. however

  • 0

I have a slickgird which saves to the database and the calculatons work.
however my issue is when returning data from the database to populate a slickgrid. I am calling an Ajax query which returns the data fine in the following format,

[
{
    'HeaderService': 'ServicerReview',
    'Service': '',
    'Numberof': '',
    'at': '',
    'Charged': '',
    'Total': '',
    'Total2': '',
    'Discount': '',
    'FFO': '',
    'EC': '',
    'ECat': '',
    'ECCost': '',
    'ECCostTotal': '',
    'ECCostTotal2': '',
    'Margin': ''
},
{
    'HeaderService': '',
    'Service': 'SeniorReviewer',
    'Numberof': '1',
    'at': '@',
    'Charged': '£600.00',
    'Total': '£600.00',
    'Total2': '',
    'Discount': '',
    'FFO': '',
    'EC': '1',
    'ECat': '',
    'ECCost': '£350.00',
    'ECCostTotal': '£350.00',
    'ECCostTotal2': '',
    'Margin': ''
},    
 .. and so on.
]

(. being other records of the same structure). which populates a variable called currentData
Then I decorate the grid by

  var columns = [{ id: "HeaderService", name: "Category", field: "HeaderService", options: serviceHeaders, editor: Slick.Editors.SelectOption, width: 200 },
           { id: "Service", name: "Service", field: "Service", options: serviceActuals, editor: Slick.Editors.SelectOption, width: 150 },
           { id: "Numberof", name: "No", field: "Numberof", editor: Slick.Editors.Text, width: 50 },
           { id: "at", name: "", field: "at", width: 30 },
           { id: "Charged", name: "Per Unit", field: "Charged", editor: Slick.Editors.Text },
           { id: "Total", name: "Total", field: "Total", editor: Slick.Editors.Text },
           { id: "Total2", name: "Sub Total", field: "Total2", editor: Slick.Editors.Text },
           { id: "Discount", name: "Discount", field: "Discount", options: ",Yes", editor: Slick.Editors.SelectOption, cssClass: "greenbackground", width: 50 },
           { id: "FFO", name: "Fixed Fee", field: "FFO", editor: Slick.Editors.Text, cssClass: "greenbackground" },
           { id: "EC", name: "EC", field: "EC", editor: Slick.Editors.Text, width: 50 },
           { id: "ECat", name: "Cat", field: "ECat", editor: Slick.Editors.Text, width: 30 },
           { id: "ECCost", name: "Cost", field: "ECCost", editor: Slick.Editors.Text },
           { id: "ECCostTotal", name: "CostTotal", field: "ECCostTotal", editor: Slick.Editors.Text },
           { id: "ECCostTotal2", name: "CostTotal2", field: "ECCostTotal2", editor: Slick.Editors.Text },
           { id: "Margin", name: "Margin", field: "Margin", editor: Slick.Editors.Text }, ];

var options = {
    enableCellNavigation: true,
    enableColumnReorder: false,
    editable: true,
    cellHighlightCssClass: "changed"
};

var currentData;

$(function () {
    var json = null;
    $.ajax({
        async: false,
        global: false,
        type: 'GET',
        url: '@Url.Action("GetDetailsforQuote")',
        dataType: "json",
        success: function (data) {
            currentData = "[" + data.toString() + "]";
            debugger;
            return data;
        }
    });

    data = currentData;
    alert(data);
    grid = new Slick.Grid("#myServicesGrid", data, columns, options);

But the grid is then displayed on the screen, the columns are fine but there are loads of empty rows, with no data(the data should only have 6 records). any ideas to what I am doing wrong?

  • 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-12T15:02:21+00:00Added an answer on June 12, 2026 at 3:02 pm

    Got it… had to add

         data = eval("[" + currentData + "]");
    
        grid = new Slick.Grid("#myServicesGrid", data, columns, options);
    

    thanks for looking.

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

Sidebar

Related Questions

As the title says, I have slickgrid getting/parsing JSON data from PHP, but while
I have a slickgrid, with about 100 rows. Its data is refreshed in 5
Have deployed numerous report parts which reference the same view however one of them
I have a webpage with a slickgrid which renders an array of objects on
I have a page which displays ~300 pages worth of tabular data. Firefox, Chrome,
I have a slickgrid in which some rows are hidden by a filter (DataView).
Have one Doubt In MVC Architecture we can able to pass data from Controller
Have converted devise new session from erb to Haml but doens't work, this is
I have a slickgrid which works fantastic, it has calculations/ subtotals / expenses etc,
I'm using a SlickGrid data table and some of my cells have very long

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.