Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: fnRowCallback TableComponent

  1. #1

    Default fnRowCallback TableComponent

    Hello.
    I've added some options to TableComponents with dataTable examples, but now I'm trying to change the class for the <tr> to add colors at TableComponent grid.

    How can I modify CoreComponents to do it?

    I've check this example:

    Code:
    "fnRowCallback": function( nRow, aData, iDisplayIndex ) {
                /* Append the grade to the default row class name */
                if ( aData[4] == "A" )
                {
                    $('td:eq(4)', nRow).html( '<b>A</b>' );
                }
                return nRow;
           }
    Thanks

  2. #2
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    I don't understand; you want to contribute back an improvement or are you trying to configure it in any way?
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3

    Default

    The tableComponent is fine, but I'd like add more configuration, as you do for colHeaders, colTypes, etc ...
    I would like to add more functionality, and for example add colors to the grid, add searches for each column, etc., as shown in the dataTable examples..

    I've added some, only for testing:
    colSortable: [true,true,false,false,true,true,true],
    colSearchable: [true,false,false,false,true,true,true],
    paginationType:'two_button', //"full_numbers",
    filter: false,
    lengthChange: true,
    stripClasses: ["gradeA","gradeC"],

    But there are others as mentioned that I don't now how to add in CoreComponents taking into account the TableComponent code..

  4. #4
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    The idea is NOT to touch the table plugin code. You need to use the available callbacks as described in http://www.sprymedia.co.uk/article/DataTables

    Give it a try and good luck
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.