andyhill Posted February 9, 2019 Share Posted February 9, 2019 I have A Complex Table (minimised here for simplicity), Please advise how I can set each row color in the itemTpl based on a DBListGrid Data Value. ListGrid.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config)'+ '{'+ 'config.itemTpl='+ '<table style="width:100%; white-space: nowrap; vertical-align:middle;">'+ ' <tr bgcolor={[this.getColour(values)]}'+ ' <td "Test Data"/td>'+ ' </tr>'+ '</table>,'+ ' {'+ ' getColour: function(values)'+ ' {'+ ' if(values[1] == true) return "#FF00FF";'+ ' else return "#00FF00";'+ ' }'+ ' };'+ '<img onclick="javascript:xxxxx"/>'+ '}' ); Link to comment Share on other sites More sharing options...
andyhill Posted February 14, 2019 Author Share Posted February 14, 2019 Please advise ... Link to comment Share on other sites More sharing options...
Sherzod Posted February 14, 2019 Share Posted February 14, 2019 42 minutes ago, andyhill said: Please advise ... Hello, Sorry for the late reply First you should use Ext.XTemplate And secondly, to some extent you have already solved this: Link to comment Share on other sites More sharing options...
SISBLU Software Posted February 15, 2019 Share Posted February 15, 2019 I also need this function. Does anyone have an example? I use unimDBListGrid, and I can not change the color according to the image. Can someone help me? Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2019 Share Posted February 15, 2019 2 minutes ago, Daha Software said: I use unimDBListGrid, and I can not change the color according to the image. Can someone help me? Hello, Can you make a simple testcase for this? And the color of what you wanted to change? Link to comment Share on other sites More sharing options...
SISBLU Software Posted April 10, 2019 Share Posted April 10, 2019 Please, in version 1.90.0.1495, the split columns function in the UnimDBListGrid does not work. Before I said it like this: In ServerModule, Custom CSS: .list .x-list-item { display: inline-block; width: 50%; } in version 1.90.0.1495 not work... Help me Link to comment Share on other sites More sharing options...
Recommended Posts