Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8336557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:01:40+00:00 2026-06-09T04:01:40+00:00

I am new to MVC4 and Knockout. I am starting with a grid. so

  • 0

I am new to MVC4 and Knockout. I am starting with a grid. so I have copied everything from this URL :
http://knockoutjs.com/examples/grid.html

so here is my js file.

      $(document).ready(function () {
         ko.applyBindings(new PagedGridModel(initialData));
      });

    var initialData = [
       { name: "Well-Travelled Kitten", sales: 352, price: 75.95 },
        { name: "Speedy Coyote", sales: 89, price: 190.00 },
       { name: "Furious Lizard", sales: 152, price: 25.00 },
       { name: "Indifferent Monkey", sales: 1, price: 99.95 },
       { name: "Brooding Dragon", sales: 0, price: 6350 },
       { name: "Ingenious Tadpole", sales: 39450, price: 0.35 },
       { name: "Optimistic Snail", sales: 420, price: 1.50 }
      ];

var PagedGridModel = function (items) {
    this.items = ko.observableArray(items);
    this.gridViewModel = new ko.simpleGrid.viewModel({
        data: this.items,
        columns: [
            { headerText: "Item Name", rowText: "name" }
            ],
        pageSize: 4
    });
};

here is my cshtml

    <link href="../../Content/list/list.css" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript">     </script>
   <script src="../../Scripts/knockout-1.3.0beta.js" type="text/javascript"></script>
   <script src="../../Scripts/list/list.js" type="text/javascript"></script>

  <div class='liveExample'> 


<div data-bind='simpleGrid: gridViewModel'> </div>

<button data-bind='click: addItem'>
    Add item
</button>

<button data-bind='click: sortByName'>
    Sort by name
</button>

<button data-bind='click: jumpToFirstPage, enable: gridViewModel.currentPageIndex'>
    Jump to first page
</button>

</div>​

“ko.simpleGrid” is getting undfined so
Its saying that *can not read property ‘viewModel’ of undefind * . what might be the cause ?

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:01:44+00:00Added an answer on June 9, 2026 at 4:01 am

    I think you forgot to include knockout.simpleGrid.1.3.js script that contains plugin implementation. You can check example at knockout simple grid fiddle sandbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to PHP and MySQL, have heard amazing things about this website from Leo
In ASP.net MVC4 there's this 'new' concept of a web API for exposing CRUD
I've created a method using the new WebAPI features in MVC4 and have it
NEW EDIT: I have narrowed my problem to this - i have a view
Just created a new MVC 4 project and copied over some areas from an
I am new to C#, MVC4, ASP.NET, Entity Framework. I have an XML file
I am starting to use MVC4 Web API project, I have controller with multiple
I have Mini-Profiler installed on a new MVC4 site and notice a big wait
I'm using the new Bundling feature in ASP.NET MVC4. Currently I have the following
I am starting a new project using MVC4 and would like to use dependency

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.