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

  • Home
  • SEARCH
  • 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 6782451
In Process

The Archive Base Latest Questions

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

What I have is a treegrid populated with values from ajax. Every 30 seconds

  • 0

What I have is a treegrid populated with values from ajax. Every 30 seconds the store is refreshed and new data is displayed.

I need to change the styling (color or background-color) of a treegrid cell when it’s value differs from the old one. The requirement is to make the comparison and styling from javascript.

Any ideas on how this could be done ?

  • 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:44:38+00:00Added an answer on May 26, 2026 at 4:44 pm

    You could use dijit.Tree’s getRowStyle method to modify the style dynamically. It will be called whenever a row needs to be rendered.

    Something like this might get you started:

    (function(){ // closure for private variables
    
    var previousValues = {};
    
    var myTree = ... // lookup dijit.Tree via dijit.byId, or create
    
    myTree.getRowStyle = function(item){
        var style = {};
        var itemId = myTree.store.getIdentity(item);
        var newValue = myTree.store.getValue(item, "MY_ITEM_VALUE");
        if(newValue !== null &&
                previousValues[itemId] !== null &&
                previousValues[itemId] !== newValue) {
            style.backgroundColor = "#0000FF";
            previousValues[itemId] = newValue;
        }
        return style;
    };
    
    })();
    

    There may be better ways to keep track of the previous values, but since your store is getting changed, I really can’t think of one.

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

Sidebar

Related Questions

Have converted devise new session from erb to Haml but doens't work, this is
I have a smartgwt treegrid, which, when expanding a group, I need to automatically
I have a datasource in SmartGWT. How do i extract data from it? I
I'm using ExtJs 3.4 and I have a TreeGrid (Ext.ux.tree.TreeGrid) with a column model.
I am using jqGrid with treeGrid. I have added a filterToolbar. I would like
Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007,
I want to implement treegrid using local proxy. Is it possible? I have tried
Have searched the database but need to specifically sum(of hours flown or days off)in
We have a requirement in which we need to load around 4000 records in
I have a client app that need to show a really big tree (It's

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.