{"id":25512,"date":"2022-03-04T09:09:47","date_gmt":"2022-03-04T08:09:47","guid":{"rendered":"http:\/\/help.qualiware.it\/qw-help\/?p=25512"},"modified":"2023-12-08T21:18:37","modified_gmt":"2023-12-08T20:18:37","slug":"griglia-modifica-font-e-altezza-intestazione-e-righe","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/griglia-modifica-font-e-altezza-intestazione-e-righe\/","title":{"rendered":"Griglia e VistaDati: modifica font e altezza intestazione e righe (vecchio layout)"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\">' Il seguente snippet deve essere inserito nell'EventoRender e consente di applicare uno stile specifico all'intestazione e alle righe di una griglia, variandone anche l'altezza\r\n' N.B. utilizzabile solo con NuovoLayout=false\r\n\r\nform.AddStyle(\".stile_header\",\"background-color:red !important;font-size:11pt !important\")\r\nform.AddStyle(\".stile_riga\",\"font-size:11pt !important;height:25px !important\")\r\n\r\nform.FindControl(\"Grid1\").SetHeaderStyle(\"stile_header\")\r\n\r\ndim i as integer\r\nfor i=1 to form.FindControl(\"Grid1\").RowCount()\r\n\tform.FindControl(\"Grid1\").SetRowStyle(i,\"stile_riga\")\r\nNext\r\n\r\n' ***** Versione utilizzabile con release precedenti alla 2021.07+4\r\ndim style as string\r\ndim g as QWWebControls.QWWebGrid2 = form.findcontrol(\"DataView1\")\r\n\r\nstyle=\"&lt;style type=\"\"text\/css\"\"&gt;\"\r\nstyle+=\"  .stile_header{font-size:11pt !important}\"\r\nstyle+=\"  .stile_riga{font-size:11pt !important;height:25px !important}\"\r\nstyle+=\"&lt;\/style&gt;\"\r\n\r\ndim l as new System.Web.Ui.WebControls.literal\r\nl.text = style\r\ng.parent.controls.add(l)\r\n\r\ng.HeaderCaptionCssClass=\"stile_header\"\r\n\r\nFor Each r As Infragistics.Web.UI.GridControls.GridRecord In g.rows\r\n  for each c as Infragistics.Web.UI.GridControls.GridRecordItem in r.Items\r\n    c.CssClass=\"stile_riga\"\r\n  Next\r\nNext\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente snippet deve essere inserito nell&#8217;EventoRender e consente di applicare uno stile specifico all&#8217;intestazione e alle righe di una griglia, variandone anche l&#8217;altezza &#8216; N.B. utilizzabile solo con NuovoLayout=false form.AddStyle(&#8220;.stile_header&#8221;,&#8221;background-color:red !important;font-size:11pt !important&#8221;) form.AddStyle(&#8220;.stile_riga&#8221;,&#8221;font-size:11pt !important;height:25px !important&#8221;) form.FindControl(&#8220;Grid1&#8221;).SetHeaderStyle(&#8220;stile_header&#8221;) dim i as integer for i=1 to form.FindControl(&#8220;Grid1&#8221;).RowCount() form.FindControl(&#8220;Grid1&#8243;).SetRowStyle(i,&#8221;stile_riga&#8221;) Next &#8216; ***** Versione utilizzabile con release precedenti&hellip;<\/p>\n","protected":false},"author":1,"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\/25512"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=25512"}],"version-history":[{"count":1,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/25512\/revisions"}],"predecessor-version":[{"id":35123,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/25512\/revisions\/35123"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=25512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=25512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=25512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}