How can i change the Background color of the row in the table, based upon some condition. When i am using a CSS class at the table level, which has the default bgColor for all the rows.
Thanks,
Dheeraj.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
can u share ur code with me i have also same problem and one thing more i m using datasource for the showing the record how can i use wrapper class for reporting
rgds
ritesh
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am also interested by your code because I have the following problem I want to change color on the column's value.
I should resolve this problem this week I hope you
coul help me quickly.
Thanks a lot in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
i just found a solution to change bgcolor based upon Condition (for me when a column have a specific value)
But my solution is not very well made as you can see if this description :
I made a javascript "script" which makes a loop for all items of my "list object" which the display tag table ;
in each step of this loop, i generate what i want to find if the color of the line is to change ;
then for all lines, i try to find this value (i put this text value in a div which can be hidden)
If i find it, that's means that the bgcolor of a line is to change; So a javascript function return the html table row which contains this value
and with this row element, i execute row.style.background-color='red';
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can i change the Background color of the row in the table, based upon some condition. When i am using a CSS class at the table level, which has the default bgColor for all the rows.
Thanks,
Dheeraj.
I am done with this.
Dheeraj.
How did you end up solving this? Please share the solution. Thanks!
i came up with a manual workaround for this problem:
For each row i generated a script as (depending on the condition):
Thus storing the style class for each row.
Then on body onload() you can call the following method, that simply applies the class from the array to each row, (or to individual columns on table)
function setColumnClass(){
var tb = document.getElementById('recordsTable');
var cols;
if(tb && tb.rows && tb.rows.length){
for(i = 1 ; i < tb.rows.length
; i++){
tb.rows[i].className = classArray[i - 1];
}
}
You may add futher checks to optimize the code above. Hope this helps.
Could you please share the solution?
Thanks!
Saila
I need your help too..
chenhuan0212@pchome.com.tw
thanks a lot
Could you sed your code. I have the following problem I want to change color on the column's value.
Thanks
Pradeep
Let me know your email id, i can send you the code, since for this i had to make some changes to display-tag code too.
Plus i had to use ColumnDecorator.
Dheeraj.
can u share ur code with me i have also same problem and one thing more i m using datasource for the showing the record how can i use wrapper class for reporting
rgds
ritesh
Hi Dheeraj,
Could you share ur solution with me. I want to change the row color on row selection with mouse.
ritesh.sood@deltion.co.uk
Thanks,
Ritesh
I am also interested by your code because I have the following problem I want to change color on the column's value.
I should resolve this problem this week I hope you
coul help me quickly.
Thanks a lot in advance
I am also interested ; so if you can send your code to me, i would be happy
richard.tuquet-laburre@itldev.fr
Hello
i just found a solution to change bgcolor based upon Condition (for me when a column have a specific value)
But my solution is not very well made as you can see if this description :
I made a javascript "script" which makes a loop for all items of my "list object" which the display tag table ;
in each step of this loop, i generate what i want to find if the color of the line is to change ;
then for all lines, i try to find this value (i put this text value in a div which can be hidden)
If i find it, that's means that the bgcolor of a line is to change; So a javascript function return the html table row which contains this value
and with this row element, i execute row.style.background-color='red';
I am facing the same problem with display tag. Can you please share your solution ? My email address is faisal.moin@gmail.com
Faisal Moin Khan
I submitted a patch for this feature about a week ago. You can grab the patch and read the comments at: http://jira.codehaus.org/browse/DISPL-192
Could you please share the solution? My email address is ipradeepkumar@yahoo.com
Thanks
Pradeep
I am facing the same problem with display tag. Can you please share your solution ? My email address is haritha_gavva@yahoo.com