This example demonstrates how to color DataTable rows based on data in a cell. In this case, rows with Quantity less than 40 are highlighted.
We nullify the default coloring for a simpler looking table with the marked rows really standing out.
Using a custom formatter, records that need to have their corresponding rows colored are stored in a collection outside the DataTable. Then the DataTable's renderEvent
is subscribed to with a function to apply the mark
class to the appropriate rows.
Note: You are viewing this example in debug mode with logging enabled. This can significantly slow performance.
Copyright © 2008 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings