Longer answer: in the native client we have a layout manager that will do those kinds of things - no problem. In the web client we have sucky HTML. That would mean re-drawing the entire list to change the highlight.
Longer answer: in the native client we have a layout manager that will do those kinds of things - no problem. In the web client we have sucky HTML. That would mean re-drawing the entire list to change the highlight.
You can post as a feature request, though.
In the meanwhile, you can always use a little method assigning the pk of the selected line to a global. Then you can change your code like
var index = arguments[0];
var selected = arguments[1];
if (table_pk == globals.gPk){
return "#b5d5ff";
}
else{
if (index % 2 == 0)//alternate even/odd
{
return '#ffffff';
}else{
return '#ffffcc';
}
}
Not a very elegant solution, but in certain circumstances it may work.
Not to be difficult, but “sucky HTML” is perfectly capable of updating colors of things client-side with minimal DOM javascripting.
Not to say that it’s necessarily a big deal that Web client doesn’t currently support that, but with modern browsers you can do most of this sort of rich client type visual cues without round trips to the browser or reloading the page.
What I should have said is: Almost anything is possible in HTML with JavaScript and XML. Unfortunately, this is not a feature that we support at the current time.
This is not a thing about what a browser can or cant do
The problem is that this is not a browser only thing. Because the bg color calc runs on the server (you have no idea what it uses for data…)
So because of that we have to listen to every click on the table then go to the server on the server we have to remember exactly what the previous row was and get the color for that previous row and the current row then go back to the browser with that information and exactly style all the right elements in the table to the 2 new colors.
This is not an easy to do thing. But we are working on it.