开发者

Change style of a EnhancedGrid line on "onRowClick" event

开发者 https://www.devze.com 2023-01-31 19:31 出处:网络
I want to change a color of grid line but without 开发者_C百科selecting it. It means I cannot use onStyleRow event as it reacts only for \'selected\', \'odd\' or \'over\' event.

I want to change a color of grid line but without 开发者_C百科selecting it. It means I cannot use onStyleRow event as it reacts only for 'selected', 'odd' or 'over' event.

Any ideas?

thx


I found an updateRowStyles(idxRow) function, but no idea how to use it (how to pass syles etc.) and not sure if it will solve my problem


You cant change your style this way:

var layout = [
{ field: 'denumire', name: 'Denumire', width: '200px', height: '25px', styles: "color:red;" },
{ field: 'valoare', name: 'Valoare', width: '252px', styles: "color:red;"}];

or use formatter in layout grid

var layout = [
{ field: 'denumire', name: 'Denumire', width: '200px', height: '25px',  formatter:  function (value, rowIndex) {
       return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
} },
{ field: 'valoare', name: 'Valoare', width: '252px',
formatter: function (value, rowIndex) {
       return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
}}];
0

精彩评论

暂无评论...
验证码 换一张
取 消