volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 506 forks source link

jtable is blank and empty #2123

Open erummirza opened 6 years ago

erummirza commented 6 years ago

write certain piece of code using mvc 4 and jquery and jtable ,but data is not visible in grid ,only blank grid is present , (No data available!) although i have updated all references of jquery in vs 2012 , action method is returning data though

`function GetFilter() { // alert("fdgdf")

    $('#PersonTableContainer').jtable({
        title: 'Table of people',
        actions: {
            listAction: '/Department/DeptList',
            // createAction: '/Test/Index3',
            // updateAction: '/GettingStarted/UpdatePerson',
            //  deleteAction: '/GettingStarted/DeletePerson'
        },
        fields: {
            DepartmentID: {
                key: true,
                list: false
            },
            Department: {
                title: 'Author Name',
                width: '40%'
            }
            //Age: {
            //    title: 'Age',
            //    width: '20%'
            //},
            //RecordDate: {
            //    title: 'Record date',
            //    width: '30%',
            //    type: 'date',
            //    create: false,
            //    edit: false
            //}
        }
    });
    $('#PersonTableContainer').jtable('load');

}`

`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

MagicCity | Support @* *@ @* *@ @* *@ @* *@
@RenderBody()

Image Gallery

Services Overview

Curabitur sed urna id nunc pulvinar semper. Nunc sit amet tortor sit amet lacus sagittis posuere cursus vitae nunc.Etiam venenatis, turpis at eleifend porta, nisl nulla bibendum justo.

Contact Us

Nullam quam lorem, tristique non vestibulum nec, consectetur in risus. Aliquam a quam vel leo gravida gravida eu porttitor dui.

Address: 1458 TemplateAccess, USA
Telephone: +123-1234-5678
FAX: +458-4578
Others: +301 - 0125 - 01258
E-mail: mail@yoursitename.com

This template downloaded form free website templates

`

misterparsons commented 6 years ago

Hi, jTable displays the data sent by the server, so no data is arriving. Can you post the json data coming from the server, and the server code for DeptList that generates it,