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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:42:43+00:00 2026-05-31T04:42:43+00:00

How to get the Backgroud or text colour of first five rows to be

  • 0

How to get the Backgroud or text colour of first five rows to be different from the next five rows.
For example, First 5 Yellow,5 Orange,5 Yellow,5 Orange,and so on..

I added following listener for the grid

listeners: {
    viewready: function(g) {
        g.getView().getRow(1).style.color="#f30";
    }
} 

I’ve used this to get the contents in second line in red.But it’s not working for me.

  • 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-31T04:42:44+00:00Added an answer on May 31, 2026 at 4:42 am

    You can use a custom GridView getRowClass method:

    var mygrid = new Ext.grid.GridPanel({
       viewConfig: {
          getRowClass: function(record, index, rowParams)
          {
             return (Math.floor(index / 5.0) % 2 == 0) ? 'rowClass1' : 'rowClass2';
          }
       }
    })
    

    Then define in your page or in your css the custom row style classes.

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

Sidebar

Related Questions

I am trying to get the RGB background color in IE using the following
Let me brief you the whole requirement first. I have the following HTML code:
This is a two part question - first I need to get every element
I try to get input from a textfield of type INPUT and save its
EDITED: this first version was a false example with false assumptions! See below for
This is the first time I've ever tried JQuery basically because I couldnt get
I have the following, very simple html page: <html> <head> <script type="text/javascript"> function alertSelection()
REVISED...ADDITIONAL INFO ADDED AT BOTTOM... I am trying to get a dynamically created, nested
I hae the following CSS selector: .section h1, .section > div:first-child { background-color: #E5E5E5;
trying to get my first HTML/CSS uni assignment sorted but have become a bit

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.