-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color whole row based on store data #236
Comments
Currently I wrap the row render function. It would be nice if the column definition accepted a function to generate the class. |
Do you have any sample code you could share? Thanks! |
Looking to do something like this as well. Whats the best way to append some styling to the default rowRender functionality? |
This is possible, more or less efficiently depending on whether you're using Dojo 1.7 or 1.8. In Dojo 1.7, you'd have to use aspect.around(grid, "renderRow", function(original) {
return function(object) {
var row = original.apply(this, arguments);
// Apply classes to `row` based on `object` here
return row;
};
}); In Dojo 1.8, you have the option of using aspect.after(grid, "renderRow", function(row, args) {
// Apply classes to `row` based on `args[0]` here
return row;
}); As for @mikerobi's idea of allowing specification of a function for
I do think it's a useful idea, but it'd require more thought. Since I believe my response above addresses the question this issue asks, I'm closing it out. |
Hi,
Is there a way of styling a whole row based on the data in the row. i.e. if column x has data y in row z, set the background of row z to red.
Thanks,
Guy
The text was updated successfully, but these errors were encountered: