JS Grid not showing data in table2019 Community Moderator ElectionLoading js-grid then filtering dataLoading jsGrid Dropdown by data from another jsGridreadOnly text field will show a box in edit modedynamic data is fetched through Js-grid, but filtering is not working?How to find grid instance?How to clear all data is jsGrid?Using js-grid with dynamic data: Edit / Delete controls dont appearJS grid not showing in Partial View MVCUpdate select dropdown list on filtering js-grid data - Refreshing header row input/selectjsGrid not showing table
gerund and noun applications
Unfrosted light bulb
Do native speakers use "ultima" and "proxima" frequently in spoken English?
How are passwords stolen from companies if they only store hashes?
I got the following comment from a reputed math journal. What does it mean?
What are substitutions for coconut in curry?
In Aliens, how many people were on LV-426 before the Marines arrived?
I seem to dance, I am not a dancer. Who am I?
Worshiping one God at a time?
Existence of a celestial body big enough for early civilization to be thought of as a second moon
When did antialiasing start being available?
Brake pads destroying wheels
In what cases must I use 了 and in what cases not?
Geography in 3D perspective
Practical application of matrices and determinants
Is it possible to stack the damage done by the Absorb Elements spell?
Are dual Irish/British citizens bound by the 90/180 day rule when travelling in the EU after Brexit?
Optimising a list searching algorithm
Print a physical multiplication table
How could an airship be repaired midflight?
PTIJ: Why do we blow Shofar on Rosh Hashana and use a Lulav on Sukkos?
Is there a creature that is resistant or immune to non-magical damage other than bludgeoning, slashing, and piercing?
Does .bashrc contain syntax errors?
World War I as a war of liberals against authoritarians?
JS Grid not showing data in table
2019 Community Moderator ElectionLoading js-grid then filtering dataLoading jsGrid Dropdown by data from another jsGridreadOnly text field will show a box in edit modedynamic data is fetched through Js-grid, but filtering is not working?How to find grid instance?How to clear all data is jsGrid?Using js-grid with dynamic data: Edit / Delete controls dont appearJS grid not showing in Partial View MVCUpdate select dropdown list on filtering js-grid data - Refreshing header row input/selectjsGrid not showing table
I forced to change my nearly finished project developed on Filemaker to Open Source due to licensing issues. So I have to learn PHP, Javascript and all that stuff while programming. I am struggling now for 2 weeks with this issue. I have a php file with my JS Grid table which is also visible:
My code for the table:
$(document).ready(function()
$('#contacts_table').jsGrid(
width: "100%",
height: "457px",
pageLoading: false,
filtering: true,
inserting: true,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 2,
confirmDeleting: true,
noDataContent: "Not found",
deleteConfirm: "Do you really want to delete data?",
controller:
loadData: function (filter)
return $.ajax(
type: "GET",
url: "fetch_contacts_supplier_JS_Grid.php",
data: filter,
dataType: "json"
);
,
,
fields: [
name: "Id", type: "number", width: 10, visible: false,
name: "SupplierId",type: "number", width: 10, visible: false,
name: "Title", type: "text", width: 10, validate: "required",
name: "Name", type: "text", width: 30, validate: "required",
name: "Surname", type: "text", width: 30, validate: "required",
name: "Position", type: "text", width: 20, validate: "required",
name: "Phone", type: "text", width: 30,
name: "Mobile", type: "text", width: 30,
name: "Fax", type: "text", width: 30,
name: "Email", type: "text", width: 30,
name: "Active", type: "checkbox", width: 10, validate: "required",
type: "control", width: 10
]
);
);
My code for the DB select (which works) fetch_contacts_supplier_JS_Grid.php:
if($method == 'GET')
If ($statement = $link->prepare("SELECT * FROM suppliers_contacts WHERE _fk_SuppliersID = 1"))
if ($statement->execute())
$result = $statement->get_result(); // fetchAll(PDO::FETCH_ASSOC);
while($row = $result->fetch_assoc())
$new_array[] = array(
'Id' => $row['_pk_SuppliersContactsID'],
'SupplierId' => $row['_fk_SuppliersID'],
'Title' => $row['Title'],
'Name' => $row['Name'],
'Surname' => $row['Surname'],
'Position' => $row['Job_Position'],
'Phone' => $row['PhoneFixed'],
'Mobile' => $row['PhoneCell'],
'Fax' => $row['PhoneFax'],
'Email' => $row['Email'],
'Active' => $row['Active']
);
header("Content-Type: application/json");
echo json_encode($new_array);
ELSE
echo $link->error;
The array I get in the console:
["Id":1,"SupplierId":1,"Title":"Mr.","Name":"Jens","Surname":"Dietzel","Position":"Owner","Phone":"145754","Mobile":"86868","Fax":"4368843","Email":"jens@jd-sd.com.na","Active":"checked","Id":2,"SupplierId":1,"Title":"Mrs.","Name":"Karen","Surname":"Mann","Position":"Manager","Phone":"24525","Mobile":"745754","Fax":"544","Email":"karen@test.de","Active":"checked"]
But the table shows not found
. What am I doing wrong?
jsgrid
add a comment |
I forced to change my nearly finished project developed on Filemaker to Open Source due to licensing issues. So I have to learn PHP, Javascript and all that stuff while programming. I am struggling now for 2 weeks with this issue. I have a php file with my JS Grid table which is also visible:
My code for the table:
$(document).ready(function()
$('#contacts_table').jsGrid(
width: "100%",
height: "457px",
pageLoading: false,
filtering: true,
inserting: true,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 2,
confirmDeleting: true,
noDataContent: "Not found",
deleteConfirm: "Do you really want to delete data?",
controller:
loadData: function (filter)
return $.ajax(
type: "GET",
url: "fetch_contacts_supplier_JS_Grid.php",
data: filter,
dataType: "json"
);
,
,
fields: [
name: "Id", type: "number", width: 10, visible: false,
name: "SupplierId",type: "number", width: 10, visible: false,
name: "Title", type: "text", width: 10, validate: "required",
name: "Name", type: "text", width: 30, validate: "required",
name: "Surname", type: "text", width: 30, validate: "required",
name: "Position", type: "text", width: 20, validate: "required",
name: "Phone", type: "text", width: 30,
name: "Mobile", type: "text", width: 30,
name: "Fax", type: "text", width: 30,
name: "Email", type: "text", width: 30,
name: "Active", type: "checkbox", width: 10, validate: "required",
type: "control", width: 10
]
);
);
My code for the DB select (which works) fetch_contacts_supplier_JS_Grid.php:
if($method == 'GET')
If ($statement = $link->prepare("SELECT * FROM suppliers_contacts WHERE _fk_SuppliersID = 1"))
if ($statement->execute())
$result = $statement->get_result(); // fetchAll(PDO::FETCH_ASSOC);
while($row = $result->fetch_assoc())
$new_array[] = array(
'Id' => $row['_pk_SuppliersContactsID'],
'SupplierId' => $row['_fk_SuppliersID'],
'Title' => $row['Title'],
'Name' => $row['Name'],
'Surname' => $row['Surname'],
'Position' => $row['Job_Position'],
'Phone' => $row['PhoneFixed'],
'Mobile' => $row['PhoneCell'],
'Fax' => $row['PhoneFax'],
'Email' => $row['Email'],
'Active' => $row['Active']
);
header("Content-Type: application/json");
echo json_encode($new_array);
ELSE
echo $link->error;
The array I get in the console:
["Id":1,"SupplierId":1,"Title":"Mr.","Name":"Jens","Surname":"Dietzel","Position":"Owner","Phone":"145754","Mobile":"86868","Fax":"4368843","Email":"jens@jd-sd.com.na","Active":"checked","Id":2,"SupplierId":1,"Title":"Mrs.","Name":"Karen","Surname":"Mann","Position":"Manager","Phone":"24525","Mobile":"745754","Fax":"544","Email":"karen@test.de","Active":"checked"]
But the table shows not found
. What am I doing wrong?
jsgrid
Not found means what ? The data is showing as not found or anything else ? Its unclear. Provide more details about the error
– Lingasamy Sakthivel
Mar 9 at 12:12
add a comment |
I forced to change my nearly finished project developed on Filemaker to Open Source due to licensing issues. So I have to learn PHP, Javascript and all that stuff while programming. I am struggling now for 2 weeks with this issue. I have a php file with my JS Grid table which is also visible:
My code for the table:
$(document).ready(function()
$('#contacts_table').jsGrid(
width: "100%",
height: "457px",
pageLoading: false,
filtering: true,
inserting: true,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 2,
confirmDeleting: true,
noDataContent: "Not found",
deleteConfirm: "Do you really want to delete data?",
controller:
loadData: function (filter)
return $.ajax(
type: "GET",
url: "fetch_contacts_supplier_JS_Grid.php",
data: filter,
dataType: "json"
);
,
,
fields: [
name: "Id", type: "number", width: 10, visible: false,
name: "SupplierId",type: "number", width: 10, visible: false,
name: "Title", type: "text", width: 10, validate: "required",
name: "Name", type: "text", width: 30, validate: "required",
name: "Surname", type: "text", width: 30, validate: "required",
name: "Position", type: "text", width: 20, validate: "required",
name: "Phone", type: "text", width: 30,
name: "Mobile", type: "text", width: 30,
name: "Fax", type: "text", width: 30,
name: "Email", type: "text", width: 30,
name: "Active", type: "checkbox", width: 10, validate: "required",
type: "control", width: 10
]
);
);
My code for the DB select (which works) fetch_contacts_supplier_JS_Grid.php:
if($method == 'GET')
If ($statement = $link->prepare("SELECT * FROM suppliers_contacts WHERE _fk_SuppliersID = 1"))
if ($statement->execute())
$result = $statement->get_result(); // fetchAll(PDO::FETCH_ASSOC);
while($row = $result->fetch_assoc())
$new_array[] = array(
'Id' => $row['_pk_SuppliersContactsID'],
'SupplierId' => $row['_fk_SuppliersID'],
'Title' => $row['Title'],
'Name' => $row['Name'],
'Surname' => $row['Surname'],
'Position' => $row['Job_Position'],
'Phone' => $row['PhoneFixed'],
'Mobile' => $row['PhoneCell'],
'Fax' => $row['PhoneFax'],
'Email' => $row['Email'],
'Active' => $row['Active']
);
header("Content-Type: application/json");
echo json_encode($new_array);
ELSE
echo $link->error;
The array I get in the console:
["Id":1,"SupplierId":1,"Title":"Mr.","Name":"Jens","Surname":"Dietzel","Position":"Owner","Phone":"145754","Mobile":"86868","Fax":"4368843","Email":"jens@jd-sd.com.na","Active":"checked","Id":2,"SupplierId":1,"Title":"Mrs.","Name":"Karen","Surname":"Mann","Position":"Manager","Phone":"24525","Mobile":"745754","Fax":"544","Email":"karen@test.de","Active":"checked"]
But the table shows not found
. What am I doing wrong?
jsgrid
I forced to change my nearly finished project developed on Filemaker to Open Source due to licensing issues. So I have to learn PHP, Javascript and all that stuff while programming. I am struggling now for 2 weeks with this issue. I have a php file with my JS Grid table which is also visible:
My code for the table:
$(document).ready(function()
$('#contacts_table').jsGrid(
width: "100%",
height: "457px",
pageLoading: false,
filtering: true,
inserting: true,
editing: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 10,
pageButtonCount: 2,
confirmDeleting: true,
noDataContent: "Not found",
deleteConfirm: "Do you really want to delete data?",
controller:
loadData: function (filter)
return $.ajax(
type: "GET",
url: "fetch_contacts_supplier_JS_Grid.php",
data: filter,
dataType: "json"
);
,
,
fields: [
name: "Id", type: "number", width: 10, visible: false,
name: "SupplierId",type: "number", width: 10, visible: false,
name: "Title", type: "text", width: 10, validate: "required",
name: "Name", type: "text", width: 30, validate: "required",
name: "Surname", type: "text", width: 30, validate: "required",
name: "Position", type: "text", width: 20, validate: "required",
name: "Phone", type: "text", width: 30,
name: "Mobile", type: "text", width: 30,
name: "Fax", type: "text", width: 30,
name: "Email", type: "text", width: 30,
name: "Active", type: "checkbox", width: 10, validate: "required",
type: "control", width: 10
]
);
);
My code for the DB select (which works) fetch_contacts_supplier_JS_Grid.php:
if($method == 'GET')
If ($statement = $link->prepare("SELECT * FROM suppliers_contacts WHERE _fk_SuppliersID = 1"))
if ($statement->execute())
$result = $statement->get_result(); // fetchAll(PDO::FETCH_ASSOC);
while($row = $result->fetch_assoc())
$new_array[] = array(
'Id' => $row['_pk_SuppliersContactsID'],
'SupplierId' => $row['_fk_SuppliersID'],
'Title' => $row['Title'],
'Name' => $row['Name'],
'Surname' => $row['Surname'],
'Position' => $row['Job_Position'],
'Phone' => $row['PhoneFixed'],
'Mobile' => $row['PhoneCell'],
'Fax' => $row['PhoneFax'],
'Email' => $row['Email'],
'Active' => $row['Active']
);
header("Content-Type: application/json");
echo json_encode($new_array);
ELSE
echo $link->error;
The array I get in the console:
["Id":1,"SupplierId":1,"Title":"Mr.","Name":"Jens","Surname":"Dietzel","Position":"Owner","Phone":"145754","Mobile":"86868","Fax":"4368843","Email":"jens@jd-sd.com.na","Active":"checked","Id":2,"SupplierId":1,"Title":"Mrs.","Name":"Karen","Surname":"Mann","Position":"Manager","Phone":"24525","Mobile":"745754","Fax":"544","Email":"karen@test.de","Active":"checked"]
But the table shows not found
. What am I doing wrong?
jsgrid
jsgrid
edited Mar 7 at 18:43
Carlos Cavero
1,2261922
1,2261922
asked Mar 7 at 17:23
JensJens
61
61
Not found means what ? The data is showing as not found or anything else ? Its unclear. Provide more details about the error
– Lingasamy Sakthivel
Mar 9 at 12:12
add a comment |
Not found means what ? The data is showing as not found or anything else ? Its unclear. Provide more details about the error
– Lingasamy Sakthivel
Mar 9 at 12:12
Not found means what ? The data is showing as not found or anything else ? Its unclear. Provide more details about the error
– Lingasamy Sakthivel
Mar 9 at 12:12
Not found means what ? The data is showing as not found or anything else ? Its unclear. Provide more details about the error
– Lingasamy Sakthivel
Mar 9 at 12:12
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049612%2fjs-grid-not-showing-data-in-table%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049612%2fjs-grid-not-showing-data-in-table%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Not found means what ? The data is showing as not found or anything else ? Its unclear. Provide more details about the error
– Lingasamy Sakthivel
Mar 9 at 12:12