{"id":35139,"date":"2023-12-09T00:21:37","date_gmt":"2023-12-08T23:21:37","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=35139"},"modified":"2024-10-22T19:26:45","modified_gmt":"2024-10-22T17:26:45","slug":"griglia-e-vistadati-applicazione-di-uno-stile-differente-ad-una-cella-in-base-al-valore-nuovo-layout","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/griglia-e-vistadati-applicazione-di-uno-stile-differente-ad-una-cella-in-base-al-valore-nuovo-layout\/","title":{"rendered":"Griglia e VistaDati: applicazione di uno stile differente ad una cella in base al valore (nuovo layout)"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\">' Il seguente snippet deve essere inserito nell'evento DatiCaricatiClient consente di applicare uno stile differente ad una cella di una riga di una griglia in base al valore.\r\n' N.B. pu\u00f2 essere utilizzato solo se NuovoLayout=true\r\n\r\ndim i as integer\r\nfor i=1 to form.FindControl(\"Dataview1\").RowCount()\r\n    if form.FindControl(\"DataView1\").GetCellValue(i,\"UNMIS\")=\"pz\"\r\n\t\tform.FindControl(\"DataView1\").SetCellStyle(i,\"UNMIS\",\"background-color:brown !important;color: white !important\")\r\n\tElse\r\n\t\tform.FindControl(\"DataView1\").SetCellStyle(i,\"UNMIS\",\"background-color:none;color: none\")\r\n\tEnd If\r\nNext\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente snippet deve essere inserito nell&#8217;evento DatiCaricatiClient consente di applicare uno stile differente ad una cella di una riga di una griglia in base al valore. &#8216; N.B. pu\u00f2 essere utilizzato solo se NuovoLayout=true dim i as integer for i=1 to form.FindControl(&#8220;Dataview1&#8221;).RowCount() if form.FindControl(&#8220;DataView1&#8243;).GetCellValue(i,&#8221;UNMIS&#8221;)=&#8221;pz&#8221; form.FindControl(&#8220;DataView1&#8243;).SetCellStyle(i,&#8221;UNMIS&#8221;,&#8221;background-color:brown !important;color: white !important&#8221;) Else form.FindControl(&#8220;DataView1&#8243;).SetCellStyle(i,&#8221;UNMIS&#8221;,&#8221;background-color:none;color: none&#8221;) End If&hellip;<\/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":[71],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/35139"}],"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=35139"}],"version-history":[{"count":3,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/35139\/revisions"}],"predecessor-version":[{"id":37661,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/35139\/revisions\/37661"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=35139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=35139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=35139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}