Would like to know how to highlight specific rows in GridPanel

  1. #1

    Would like to know how to highlight specific rows in GridPanel

    Is there a way after a databinding a store and gridpanel to highlight specific rows based on criteria?

    for example I am used to utilizing the ItemDataBound for a datagrid. Based on what was in the row, column 1 I would hightlight rows for system processes.

    Can this be done, and if so can I see a simple example?

    Thanks,
    Steve
  2. #2

    RE: Would like to know how to highlight specific rows in GridPanel

    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: Would like to know how to highlight specific rows in GridPanel



    I guess my question is that when I load the grid, how do I use the getRowClass from codebehind? This way when the grid is loaded, rows are already marked or highlighted.

    Thanks for the quick responses, I know you guys are busy. Busy making an outstanding product that is :)
  4. #4
    Ok, got it. I was trying to make this way to hard.

    So now for the getRowClass function I placed this in the code:
     
     
    /*
    example of record
    col_1|col_2|col_3
    201001|100|.25
    201002|100|.003
    201003|200|.001
    201004|100|.002
    201005|200|.005
    201006|300|.002
    ***Subtotal 2010 ***| 1000| .263
    */
    var getRowClass = function(record)
    {
    
       if(record.get("col_1").indexOf("***")>=0){
          return "summary-row";
       }
    }

Similar Threads

  1. Replies: 2
    Last Post: Jun 07, 2012, 5:29 PM
  2. [CLOSED] rowexpander for specific rows
    By imaa in forum 1.x Premium Help
    Replies: 6
    Last Post: Mar 21, 2012, 8:15 AM
  3. [CLOSED] GridPanel.Rows.Changing Background Color of Rows
    By supera in forum 2.x Premium Help
    Replies: 2
    Last Post: Mar 01, 2012, 6:18 PM
  4. [CLOSED] Highlight multiple rows
    By rthiney in forum 1.x Premium Help
    Replies: 1
    Last Post: Dec 23, 2011, 9:24 AM
  5. Show Specific Column in GridPanel
    By sachin.munot in forum 1.x Help
    Replies: 3
    Last Post: Oct 22, 2009, 5:51 AM

Posting Permissions