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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:35:40+00:00 2026-06-12T14:35:40+00:00

I am inserting a list like using knockout (observableArray): 1.apple delete 2.banana delete 3.mango

  • 0

I am inserting a list like using knockout (observableArray):

1.apple delete
2.banana delete
3.mango delete
4.pineapple delete

When I delete “2.banana delete“, the list appears like:

1.apple delete
3.mango delete
4.pineapple delete

But I want it to appear like:

1.apple delete
2.mango delete
3.pineapple delete

The array is like: this.list=ko.observableArray({num:1,name:apple});
I am using “foreach” and “push” function to add more elements and “remove” function to delete.

Plz help me to make the list “num” update as I delete any element.

  • 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-12T14:35:41+00:00Added an answer on June 12, 2026 at 2:35 pm

    You could use $index inside of your foreach template to display the number. This is a feature new to Knockout 2.1, as shown here: http://www.knockmeout.net/2012/05/knockout-2-dot-1-is-out.html

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

Sidebar

Related Questions

For inserting special characters in data like (,')etc., I am using mysql_real_escape_string() function &
Using LINQ-to-SQL, I would like to automatically create child records when inserting the parent
I'd like to break apart a list by inserting closing tags with jquery. Here's
I'm using LinkedHashSet. I want to insert items at the 0th position, like: Set<String>
can anyone show me the syntax for inserting a python tuple/list into a mysql
I've a problem with inserting an image after every element in my list. I
After inserting new html to DOM,I need to add some listeners to it. But
I have a query that looks like this: using (MyDC TheDC = new MyDC())
I have the following code to test memory deallocation using a std::list container: #include
During insert campaign, i am storing multiselected (checkbox List) events id stored using comma

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.