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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:36:37+00:00 2026-05-23T07:36:37+00:00

Ok, let me explain my scenario more clearly: When a cell is edited, it

  • 0

Ok, let me explain my scenario more clearly:

When a cell is edited, it becomes ‘dirty’ and I style it a certain way by adding a CSS class to the cell via javascript.

Then, if the user Sorts the grid, the styling is lost (I believe because all the rows are recreated) and I need a way to restore the styling to the appropriate cell/row after a Sort.

What I attempted to do is add an entry into data[] called ‘status’ and onCellChange I loop through data[] and match the args.item.Id to appropriate entry in data[].

grid.onCellChange.subscribe(function (e, args) {
    var done = false;
    for (var i = 0; i < data.length && !done; i++) {
        if (data[i].id == args.item.id) {
            data[i].status = "dirty";
            done = true;
        }
    }
}

However, onSort I’m not sure how to match the sorted rows to the data array. (Since I have no args.item) I’ve attempted to do selector statements:
$(“.slick-row”)
to restyle the correct cells, but I have no way to associate the rows with their entry in data[].

  • 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-23T07:36:37+00:00Added an answer on May 23, 2026 at 7:36 am

    1) There is no need to search for the item in your onCellChange handler – it is available at “args.item”.

    2) Sorting the “data” array will not wipe out your change to the item in #1.

    3) You mention dynamically styling cells. I see no code for that. If your custom formatter is the piece of code that looks at “item.status” and renders it differently if it is dirty, then you don’t have to do anything extra. Sorting the data and telling the grid to re-render will preserve the “dirty” cell styles.

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

Sidebar

Related Questions

OK let me explain the scenario. I am developing an app which has a
Can someone explain me DataSet.Copy() vs Dataset.Clone() Also let me know some scenario's where
Let me explain my scenario first: I have around 2000 tests to run, which
I need a help. Let me first explain the scenario with a small sample.
I forgot how to compile flash projects. Anyway, let me explain my specific scenario.
I got stuck with this scenario. Let me explain as follows. I have a
Ok, let me explain the scenario. I have a orders table with a auto
Let me explain you the scenario I am developing for Windows Phone 7 and
Let me explain my question with an example scenario: I'm creating an app like
Let me explain my scenario before asking the question. I am in creation phase

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.