-
Notifications
You must be signed in to change notification settings - Fork 733
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
I had defined the row style in the records, but is invalid #1372
Comments
I don't see the code in the jsfiddle... |
sorry, I make a error |
I think you must use the render on columns.... columns: [
{ field: 'fname', caption: 'First Name', size: '50%', render:function(record){
return '<div style="background-color:red">'+record.fname+'</div>';
} },
{ field: 'sdate', caption: 'Dates', size: '50%' }
], |
thanks, |
Sorry, the last update it's right, the render is in columns not in recid.... ;) |
thank you for the quickly help, |
Yes but in fact i said a think not true, or better you can use style again... ;) Bye |
thanks, |
In 1.5, w2ui specific properties need to be moved to a
Updated fiddle: http://jsfiddle.net/ya9eerb5/2/ See also my answer in this thread Cheers :) |
thanks, I try it, and now it works perfectly. By the way, i suggest that the 'render' function can work on the row, not only on the cell. i know there is already a cell 'render' function. but sometimes we need to control a row, not only a cell, for example: i have a list of persons in w2ui grid and i want to do this: //if age less than 10, to make the row's color is red; if age less than 18,to make the row's color is yellow... because the broswer reg data from the remote server, and i want the data's volume be less. thanks again. |
You can already do this if you define a column renderer and in the renderer change the style of the record row based on the record's data: |
Hello, as I would have to change the background only to a specific cell or cells in version 1.5 `
} ` |
@mpf82 thank you very much, it perfectly help me, good luck! |
@mendozada: this has already been covered in this thread. Instead of I don't know how to explain this in PHP, so please understand the following as pseudo code:
Maybe someone who knows PHP can help out with the correct syntax. @chenduansheng: If the issue is resolved for you, please close the thread :) |
the issue is resolved the problem |
You jsfiddle does not work if you sort by some column, everything is reset to default style. In latest W2UI version if I set: |
Hi, I meeted a bug,
I had defined the row style ["background-color: red"] in the records, but is invalid.
see http://jsfiddle.net/api/post/jquery/2.1/
The text was updated successfully, but these errors were encountered: