JS Grid not showing data in table The Next CEO of Stack OverflowLoading 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?JS grid not showing in Partial View MVCUpdate select dropdown list on filtering js-grid data - Refreshing header row input/selectjsGrid not showing table

What difference does it make using sed with/without whitespaces?

What CSS properties can the br tag have?

Are the names of these months realistic?

Can Sneak Attack be used when hitting with an improvised weapon?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Reference request: Grassmannian and Plucker coordinates in type B, C, D

Can I calculate next year's exemptions based on this year's refund/amount owed?

Small nick on power cord from an electric alarm clock, and copper wiring exposed but intact

Scary film where a woman has vaginal teeth

Expectation in a stochastic differential equation

Won the lottery - how do I keep the money?

TikZ: How to fill area with a special pattern?

IC has pull-down resistors on SMBus lines?

How to Implement Deterministic Encryption Safely in .NET

Airplane gently rocking its wings during whole flight

Why is information "lost" when it got into a black hole?

Purpose of level-shifter with same in and out voltages

Do scriptures give a method to recognize a truly self-realized person/jivanmukta?

Is fine stranded wire ok for main supply line?

How to get the last not-null value in an ordered column of a huge table?

Where do students learn to solve polynomial equations these days?

Man transported from Alternate World into ours by a Neutrino Detector

Is it correct to say moon starry nights?



JS Grid not showing data in table



The Next CEO of Stack OverflowLoading 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?JS grid not showing in Partial View MVCUpdate select dropdown list on filtering js-grid data - Refreshing header row input/selectjsGrid not showing table










1















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?










share|improve this question
























  • 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















1















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?










share|improve this question
























  • 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













1












1








1








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 18:43









Carlos Cavero

1,5112923




1,5112923










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

















  • 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












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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко