none
jtable is blank and empty RRS feed

  • General discussion

  • i 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 , here is layout page

    here is view and layout

     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">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>MagicCity | Support</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
        <link href="~/Content/css/style.css?v=1.1" rel="stylesheet" />
        <link href="~/Content/css/coin-slider.css?v=1.1" rel="stylesheet" />
            <link href="~/Content/css/jquery-ui.css?v=1.1" rel="stylesheet" />
    
       @* <script type="text/javascript"  src="~/Scripts/jquery-3.2.1.min.js"></script>*@
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js?v=1.1"></script>
      @*  <script type="text/javascript"  src="~/Scripts/jquery-ui-1.12.1.min.js"></script>*@
            <script type="text/javascript" src= " http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.js?v=1.1"></script>
    
        <link href="~/Scripts/jtable/themes/metro/lightgray/jtable.min.css?v=1.1" rel="stylesheet" />
        <script type="text/javascript" src="~/Scripts/jtable/jquery.jtable.min.js?v=1.1"></script>
        <script  type="text/javascript" src="~/Scripts/jtable/jquery.jtable.js?v=1.1"></script>
        <link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
         <script  type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js?v=1.1"></script>
        <link href="~/Scripts/jtable/themes/metro/lightgray/jtable.css?v=1.1" rel="stylesheet" />
    
        <script type="text/javascript" src="~/Scripts/cufon-yui.js"></script>
        <script type="text/javascript" src="~/Scripts/cufon-aller.js"></script>
       @* <script type="text/javascript" src="~/Scripts/jquery-1.4.2.min.js"></script>*@
        <script type="text/javascript" src="~/Scripts/script.js"></script>
        <script type="text/javascript" src="~/Scripts/coin-slider.min.js"></script>
        <script type="text/javascript" src="~/Scripts/jquery.ui.datepicker.js"></script>
       @* <script   type="text/javascript" src="~/Scripts/jquery-ui.js"></script>*@
    
    
    </head>
    <body>
        <div class="main">
            <div class="header">
                <div class="header_resize">
                    <div class="logo">
                        <h1><a href="index.html">Magic<span>City</span> <small>Company Slogan Here</small></a></h1>
                    </div>
                    <div class="menu_nav">
                        <ul>
                             @* <li class="active">@Html.ActionLink("Home","Index","Home")</li>
                            <li class="active">@Html.ActionLink("About", "About", "Home")</li>
                            <li class="active">@Html.ActionLink("Contact", "Contact", "Home")</li>*@
                           @* by today*@
                           <li class="active">   @Html.Partial("_LoginPartial")</li>
    
                            
                                 
                          
                                                        
    
    
                        </ul>
                    </div>
                    <div class="clr"></div>
                    <div class="slider">
                        <div id="coin-slider"> <a href="#"><img src="~/Images/slide1.jpg" width="960" height="320" alt="" /> </a> <a href="#"><img src="~/images/slide2.jpg" width="960" height="320" alt="" /> </a> <a href="#"><img src="~/images/slide3.jpg" width="960" height="320" alt="" /> </a> </div>
                        <div class="clr"></div>
                    </div>
                    <div class="clr"></div>
                </div>
            </div>
            <div class="content">
                <div class="content_resize">
                    <div class="mainbar">
                        <div class="article">
                            @RenderBody()
                        </div>
                    </div>
                    <div class="sidebar">
                        @*<div class="searchform">
                            <form id="formsearch" name="formsearch" method="post" action="#">
                                <span>
                                    <input name="editbox_search" class="editbox_search" id="editbox_search" maxlength="80" placeholder="Search our ste:" type="text" />
                                </span>
                                <input name="button_search" src="~/images/search.gif" class="button_search" type="image" />
                            </form>
                        </div>*@
                        <div class="clr"></div>
                       @if(Request.IsAuthenticated)
    
    {
                           <table border="1">
                               <tr>
                                   
                                   <td>
    
                                             <div class="gadget">
                            <h2 class="star"> Menu</h2>
                            <div class="clr"></div>
                            <ul class="sb_menu">
    
                                 <li><a tabindex="-1"  href="#">Employee</a>
                                                       <ul>
              <li>@Html.ActionLink("Add Employee", "EmployeeCreate", "Employee")</li>
              <li>@Html.ActionLink("Employee Roster Managment", "EmployeeRosterCreate", "Employee")</li>
               <li>@Html.ActionLink("Add Employee Shift", "EmployeeShiftCreate", "Employee")</li>
            
                               </ul>
                                     </li>
                                <li><a tabindex="-1" href="#">Customer</a>
                                    <ul>
                                      <li>@Html.ActionLink("Add Customer", "CustomerCreate", "Customer")</li>
                                        </ul>
                                </li>
                                <li><a tabindex="-1" href="#">Department</a>
                                     <ul>
              <li>@Html.ActionLink("Department Management", "DepartmentCreate", "Department")</li>
            
                               </ul>
    
                                </li>
                                <li><a tabindex="-1" href="#">Designation</a>
                                    <ul><li>@Html.ActionLink("Designation Management", "DesignationCreate", "Designation")</li></ul>
    
                                </li>
                                <li><a tabindex="-1"  href="#">Services</a>
    
                                    <ul>
              <li>@Html.ActionLink("Service Management", "ServiceCreate", "Service")</li>
              <li>@Html.ActionLink("Assign to Customer", "AssigntoCustomer", "Service")</li>
            
                               </ul>
                                </li>
                                <li><a  tabindex="-1"  href="#">holidays</a>
                                       <ul>
              <li>@Html.ActionLink("List of Holidays", "CreateHoliday", "Holiday")</li>
          
            
                               </ul>
    
                                </li>
                                 <li><a href="#">Reports</a></li>
                                
                            </ul>
                        </div>
                     s
                                   </td></tr>
                           </table>
                     }
    
                        <div class="gadget">
                            <h2 class="star"><span>Sponsors</span></h2>
                            <div class="clr"></div>
                            @*<ul class="ex_menu">
                                <li>
                                    <a href="http://www.dreamtemplate.com/">DreamTemplate</a><br />
                                    Over 6,000+ Premium Web Templates
                                </li>
                                <li>
                                    <a href="http://www.templatesold.com/">TemplateSOLD</a><br />
                                    Premium WordPress &amp; Joomla Themes
                                </li>
                                <li>
                                    <a href="http://www.imhosted.com/">ImHosted.com</a><br />
                                    Affordable Web Hosting Provider
                                </li>
                                <li>
                                    <a href="http://www.megastockphotos.com/">MegaStockPhotos</a><br />
                                    Unlimited Amazing Stock Photos
                                </li>
                                <li>
                                    <a href="http://www.evrsoft.com/">Evrsoft</a><br />
                                    Website Builder Software &amp; Tools
                                </li>
                                <li>
                                    <a href="http://www.csshub.com/">CSS Hub</a><br />
                                    Premium CSS Templates
                                </li>
                            </ul>*@
                        </div>
                    </div>
                    <div class="clr"></div>
                </div>
            </div>
            <div class="fbg">
                <div class="fbg_resize">
                    <div class="col c1">
                        <h2><span>Image</span> Gallery</h2>
                        <a href="#"><img src="~/images/gal1.jpg" width="75" height="75" alt="" class="gal" /></a> <a href="#"><img src="~/images/gal2.jpg" width="75" height="75" alt="" class="gal" /></a> <a href="#"><img src="~/images/gal3.jpg" width="75" height="75" alt="" class="gal" /></a> <a href="#"><img src="~/images/gal4.jpg" width="75" height="75" alt="" class="gal" /></a> <a href="#"><img src="~/images/gal5.jpg" width="75" height="75" alt="" class="gal" /></a> <a href="#"><img src="~/images/gal6.jpg" width="75" height="75" alt="" class="gal" /></a>
                    </div>
                    <div class="col c2">
                        <h2><span>Services</span> Overview</h2>
                        <p>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.</p>
                        <ul class="fbg_ul">
                            <li><a href="#">Lorem ipsum dolor labore et dolore.</a></li>
                            <li><a href="#">Excepteur officia deserunt.</a></li>
                            <li><a href="#">Integer tellus ipsum tempor sed.</a></li>
                        </ul>
                    </div>
                    <div class="col c3">
                        <h2><span>Contact</span> Us</h2>
                        <p>Nullam quam lorem, tristique non vestibulum nec, consectetur in risus. Aliquam a quam vel leo gravida gravida eu porttitor dui.</p>
                        <p class="contact_info">
                            <span>Address:</span> 1458 TemplateAccess, USA<br />
                            <span>Telephone:</span> +123-1234-5678<br />
                            <span>FAX:</span> +458-4578<br />
                            <span>Others:</span> +301 - 0125 - 01258<br />
                            <span>E-mail:</span> <a href="#">mail@yoursitename.com</a>
                        </p>
                    </div>
                    <div class="clr"></div>
                </div>
            </div>
            <div class="footer">
                <div class="footer_resize">
                    <p class="lf">&copy; Copyright <a href="#">MyWebSite</a>.</p>
                    <p class="rf">Design by Dream <a href="http://www.dreamtemplate.com/">Web Templates</a></p>
                    <div style="clear:both;"></div>
                </div>
            </div>
        </div>
        <div align=center>This template  downloaded form <a href='http://all-free-download.com/free-website-templates/'>free website templates</a></div>
    </body>
    </html>



    ERUM

    Sunday, November 19, 2017 5:31 AM

All replies

  • Best place to start is setting a break-point in your browser's developer tools, step thru code and inspect variables and object to see if this will identify the problem.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Sunday, November 19, 2017 6:31 AM
    Moderator
  • You made this same post in the ASP.NET MVC forum. Your post here is off-topic that has nothing to do with C#.
    Sunday, November 19, 2017 7:51 PM