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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:55:19+00:00 2026-05-26T16:55:19+00:00

I am using Knockout Js for my view page. I have a requirement where

  • 0

I am using Knockout Js for my view page. I have a requirement where if any editable field changes, I have to enable Save button else not. This is working nicely.
My issue is I have checkboxes too for each row of item. These are observable items in my viewModel. What happens now is when I check or uncheck any checkbox, Knockout considers that as Dirty item and enables the Save button which I don’t want.

How can I tackle this?

  • 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-05-26T16:55:20+00:00Added an answer on May 26, 2026 at 4:55 pm

    I am not sure of the exact code that you are using for a dirty flag, but if it involves using ko.toJS in a dependentObservable like this, then there is a trick that you can use to have it skip some observables.

    If you create an observable that is a property of a function, then ko.toJS will not find it.

    Here are two examples (someFlag and anotherFlag):

    function Item(id, name) {
        this.id = ko.observable(id);
        //create a sub-observable that the dirty flag won't find
        this.id.someFlag = ko.observable(false);
        this.name = ko.observable(name);
        this.dirtyFlag = new ko.dirtyFlag(this);
    
        //or similarly, place an observable on a plain ol' function
        this.forgetAboutMe = function() { };
        this.forgetAboutMe.anotherFlag = ko.observable(false);  
    }
    

    Sample here: http://jsfiddle.net/rniemeyer/vGU88/

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

Sidebar

Related Questions

I have an ASP.NET MVC 3 view using Razor and Knockout.js that is not
I'm writing a little single page app (using knockout.js :-)) whereby i have a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I am using Knockout-JS to bind properties in my view to my view model.
I'm using Knockout with jQuery and jQuery templates. Assume that I have a template
I have a view model something like below, when onAfterRender is fired by Knockout
Using online interfaces to a version control system is a nice way to have
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using Visual Studio, I have built an C++ application running in 32bit. It will
Using Core Data. Let's say we have models for Team and Player. Assume: -Each

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.