I'm currently new to Javascript and right now using this JS-grid in an Example about Prime Numbers. I have an Array with Prime Numbers: Array(4) [ " 2", " 3", " 5", " 7" ].
Which the console.log shows is populated with these values. I'd like to import it into the JS-Grid but it never displays the values in each row, but only all Values of the Array in one row. Here is my configuration right now:
var clients = [{
"Primenumber": Primenumber
}];
$("#jsGrid").jsGrid({
width: "100%",
height: "400px",
inserting: true,
editing: true,
sorting: true,
paging: true,
data: clients,
fields: [{
name: "Primenumber",
type: "text",
width: 150
},{
type: "control"
}
]
});
Am I importing the Array into the JS-Grid wrong? I'm not sure how to display each value of the Array in a seperate row. Thank you guys in Advance for your Answer!