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 8737113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:26:31+00:00 2026-06-13T10:26:31+00:00

I have a table that gets rendered by Knockout <table data-bind=visible: program> <thead> <tr>

  • 0

I have a table that gets rendered by Knockout

<table data-bind="visible: program">
    <thead>
        <tr>
            <td>Post</td>
            <td>Name</td>
            <td>Odds</td>
            <!--ko foreach: options -->
            <td data-bind="visible: value, text: name"></td>
            <!-- /ko -->
        </tr>
    </thead>
    <tbody data-bind="foreach: program() ? program().item: []">
        <tr>
            <td>
                <span data-bind="text: place"></span>
            </td>
            <td><span data-bind="text: name"></span></td>
            <td><span data-bind="text: odd"></span></td>

            <!--ko foreach: $parent.options -->
            <td data-bind="visible: value">
                <span data-bind="text: $parent[prop]"></span></td>
            <!-- /ko -->
        </tr>
    </tbody>
</table>

This table is rendered according to an observable I have (program). ‘program is updated via ajax calls and then assignment (program(ko.mapping.fromJS(prg))).

program has a array of items, the item count varies in size, but each item always have the needed fields.

I imagine there is a way I can set this up so that Knockout only renders for new things.

For example if my current program has 6 items in it, that creates a table with 6 rows, if i get a different program that also has 6 items in it, then the table shouldnt actually re-render the table just use whats already there. If then i have a 7 item program it would only render the single row it needed. And if 5 items came in the one after that it would simply remove the 2 it isn’t using

Does this sound possible? or am I off base? ** Also my example above has been reduced for ease, the table does also contain a few ko.computed functions.

  • 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-13T10:26:32+00:00Added an answer on June 13, 2026 at 10:26 am

    My repeat binding does exactly that. It only renders new rows when the array gets larger:

    <tbody>
        <tr data-bind="repeat: program() ? program().item: []">
            <td>
                <span data-bind="text: $item().place"></span>
            </td>
            <td><span data-bind="text: $item().name"></span></td>
            <td><span data-bind="text: $item().odd"></span></td>
    
            <!--ko foreach: options -->
            <td data-bind="visible: value">
                <span data-bind="text: $item()[prop]"></span></td>
            <!-- /ko -->
        </tr>
    </tbody>
    

    See https://github.com/mbest/knockout-repeat

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

Sidebar

Related Questions

I have an Excel file that gets external data from database table. I need
I have a table that gets data from core data. I added a section,
I have a table of data that gets update once a week. I then
I have multiple buttons that gets created in a table which all look like
For example I have a dropdown box that gets a town from the table
I have a self referencing table in Oracle 9i, and a view that gets
I have those code snippet that checks the fans table and gets everyone who
I have a MySQL query that: gets data from three tables linked by unique
I have table that I insert data with following query (from c# code): INSERT
I have table that gets dynamically created. When using jQuery and toggle, everything works.

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.