Results 1 to 3 of 3

Thread: Grid, getRowClass and selection

  1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    365

    Default Grid, getRowClass and selection

    Hello!

    I have a grid where I'm displaying the background of some rows in green and some rows in red depending on some values of the row. This works fine using GridView::getRowClass.


    But when I'm selecting a row, the background of the row gets blue. So the user cannot see anymore which color the row has without deselecting the row.


    I found this thread: http://www.sencha.com/forum/archive/...p/t-48882.html and added to my background style an !important, like:
    .backendGridOk {
    background-color:#80ff80 !important;
    }
    This works overriding the blue background. But now the selected row cannot be distinguished from deselected rows.


    What I need would be a way to give selected rows ANOTHER green or red in background compared to deselected rows. How can this be done?

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Do you need to support IE6/7/8? In that case you're stuck using this solution.

    If you don't, then a simple combined class css rule (.x-grid3-row-selected.my-class) will do.

  3. #3
    Sencha User
    Join Date
    Apr 2008
    Posts
    365

    Default

    combined class works fine, thanks a lot!

Similar Threads

  1. Hide grid rows depending on record value (getRowClass occupied)
    By Dr. Flink in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 6 Jul 2012, 1:12 AM
  2. PivotGrid and GetRowClass
    By stetou in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 25 Jan 2011, 12:54 PM
  3. Grid (getRowClass) with Row Expander Plugin
    By MikeFi in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 12 Dec 2010, 3:35 PM
  4. getRowClass in Editor Grid Example...
    By Adonias.cl in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 25 Jan 2009, 10:17 AM
  5. Replies: 1
    Last Post: 28 Aug 2008, 7:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •