AndersonSOS Posted October 11, 2017 Share Posted October 11, 2017 Hello I'm developing one the components of Unigui Mobile and I would like to know how to change the font and colors of a TUniMDBgrid line at run time. For example, if any field in the dataset is of a format to change the font color. Best regards Anderson Manoel Ribas Brazil Link to comment Share on other sites More sharing options...
Fábio Matte Posted April 10, 2018 Share Posted April 10, 2018 Hello I'm developing one the components of Unigui Mobile and I would like to know how to change the font and colors of a TUniMDBgrid line at run time. For example, if any field in the dataset is of a format to change the font color. Best regards Anderson Manoel Ribas Brazil Você consegue fazer isso através do CustomCSS, e isso serve para Mobile quanto para Desktop. 1. UnimDBGrid1 -> ClientEvents -> UniEvents ... beforeInit fn: function beforeInit(sender, config) { config.cls="mGridCliente"; config.itemHeight = 30; config.headerContainer = {height: 30}; } 2. UniServerModule -> CustomCSS ... add .mGridCliente .x-grid-column { border-style: solid; border-width: 1px 1px 0; height: 30px; line-height: 30px; padding: 0 8px; vertical-align: middle; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; width: 100%; text-align: center; background-color: #4CAF50; color: white; } .mGridCliente .x-grid-cell { height: 40px !important; line-height: 30px !important; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size: 18pt; font-weight: bold; color: black; border-collapse: collapse; width: 100%; background-color: #99ccff; } Link to comment Share on other sites More sharing options...
Recommended Posts