{"id":35155,"date":"2024-11-10T01:39:42","date_gmt":"2024-11-10T00:39:42","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=35155"},"modified":"2024-11-10T23:05:01","modified_gmt":"2024-11-10T22:05:01","slug":"griglia-e-vistadati-cambio-del-colore-di-una-cella-in-base-al-valore-vers-javascript-mobile","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/griglia-e-vistadati-cambio-del-colore-di-una-cella-in-base-al-valore-vers-javascript-mobile\/","title":{"rendered":"Griglia e VistaDati: cambio del colore di una cella in base al valore (vers. javascript &#8211; mobile)"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\/\/ Il seguente snippet deve essere inserito nell'evento DatiCaricatiClient per applicare uno stile differente ad una cella in base al valore in essa contenuto\r\n\r\nvar i;\r\n\r\nfor (i=0;i&lt;$('#&lt;MobileDataView1&gt;').rowCount();i++) {\r\n     var c=$('#&lt;MobileDataView1&gt;').getCell(i+1,\"TIPO\");\r\n    if ($('#&lt;MobileDataView1&gt;').getCellValue(i+1,\"TIPO\")==1) \r\n        c.css(\"background\",\"red\")\r\n    else\r\n        c.css(\"background\",\"\")\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ Il seguente snippet deve essere inserito nell&#8217;evento DatiCaricatiClient per applicare uno stile differente ad una cella in base al valore in essa contenuto var i; for (i=0;i&lt;$(&#8216;#&lt;MobileDataView1&gt;&#8217;).rowCount();i++) { var c=$(&#8216;#&lt;MobileDataView1&gt;&#8217;).getCell(i+1,&#8221;TIPO&#8221;); if ($(&#8216;#&lt;MobileDataView1&gt;&#8217;).getCellValue(i+1,&#8221;TIPO&#8221;)==1) c.css(&#8220;background&#8221;,&#8221;red&#8221;) else c.css(&#8220;background&#8221;,&#8221;&#8221;) }<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[65],"tags":[88],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/35155"}],"collection":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=35155"}],"version-history":[{"count":7,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/35155\/revisions"}],"predecessor-version":[{"id":37689,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/35155\/revisions\/37689"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=35155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=35155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=35155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}