ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: stevejacobsen on December 18, 2016, 02:17:59 am
-
I'm trying to create a new grid and I keep getting No Rows to Display. I've stripped it down to the simplest form, compared it to examples and created a fiddle but can't find the problem.
http://jsfiddle.net/v13n2afj/4/
$(function () {
var data = [{id: "1", email: "pancho@gmail.com", first_name: "Pancho", last_name: "Jacobsen", password: "password", level: "", activated: "", created: "2016-09-15 10:56:51"}];
// define colModel
var colM = [
{
title: "ID",
width: 75,
dataIndx: "id",
align: "center",
dataType: "integer"
},
{
title: "Email",
width: 260,
dataIndx: "email",
align: "left",
dataType: "string"
},
{
title: "First Name",
width: 260,
dataIndx: "first_name",
align: "left",
dataType: "string"
},
{
title: "Last Name",
width: 60,
dataIndx: "last_name",
align: "left",
dataType: "string"
},
{
title: "Password",
width: 75,
dataIndx: "password",
align: "left",
dataType: "string"
},
{
title: "Level",
width: 60,
dataIndx: "level",
align: "center",
dataType: "string"
},
{
title: "Activated",
width: 75,
dataIndx: "activated",
align: "left",
dataType: "string"
},
{
title: "Created",
width: 100,
dataIndx: "created",
align: "left",
dataType: "string"
}
];
var obj = {
width: 1150,
height: 700,
colModel: colM,
dataModel: data
};
$("#users_grid").pqGrid(obj);
});
-
Found it: Changed the dataModel to this:
dataModel: {data: data}