Hi all.
I have a datagrid with own row styler:
/**
* rowStyler function for livestream datagrids
* @param {int} idx Row index
* @param {object} row Row data
* @return {string} proper row style for given idx
*/
function lsRowStyler(idx,row) {
var c=( (idx&0x01)===0)?ac_config.ls_rowcolor1:ac_config.ls_rowcolor2;
var rgb=hexToRGB(c);
var a=parseFloat(ac_config.ls_alpha);
return "background-color:rgba("+rgb.r+","+rgb.g+","+rgb.b+","+a+")";
}
Where ac_config stores several configuration parameters.
Additionaly I have an event driven method to change alpha:
function vwls_setAlphaOSD(alpha,dg) {
alpha=parseFloat(alpha);
if (alpha<0.0) alpha=0.0; if (alpha>1.0) alpha=1.0;
// store new value
ac_config.ls_alpha=alpha;
// change css to activate new value
// **** How can I do this?
console.log ("new alpha is "+alpha);
if (typeof(dg)!=="undefined") $(dg).datagrid('options').rowStyler=lsRowStyler;
}
What I want is repaint datagrid rows according new color alpha parameter, _without_ reloading entire datagrid
Is this possible?
If so, what's the right way to do
Thanks in advance
Juan Antonio