{"id":29995,"date":"2023-03-13T09:22:24","date_gmt":"2023-03-13T08:22:24","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=29995"},"modified":"2023-03-13T09:25:18","modified_gmt":"2023-03-13T08:25:18","slug":"griglia-e-vistadati-cambio-dello-stile-della-riga-corrente-vers-javascript-2","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/griglia-e-vistadati-cambio-dello-stile-della-riga-corrente-vers-javascript-2\/","title":{"rendered":"Griglia e QWTable: riempimento di una griglia con le righe di una QWTable"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\">' il seguente frammento di codice riempie la griglia Grid1 con le righe risultanti da una query\r\ndim q as new QWTable()\r\nq.database=form.GetDataBase()\r\nq.sql=\"select TOP 10 CODICE,DESCRIZION from ARTIC\"\r\nq.requestlive=false\r\nq.active=true\r\n\r\nq.rowset.first()\r\nwhile not q.Rowset.Endofset\r\n    form.FindControl(\"Grid1\").AddRow()\r\n    form.FindControl(\"Grid1\").AssignField(\"CUSTOM1\",q.rowset.fields(\"CODICE\").value)\r\n    form.FindControl(\"Grid1\").AssignField(\"CUSTOM2\",q.rowset.fields(\"DESCRIZION\").value)\r\n    form.FindControl(\"Grid1\").SaveRow()\r\n\r\n    q.rowset.next()\r\nEnd while\r\n\r\nform.FindControl(\"Grid1\").MoveFirst()\r\nq.active=false\r\n\r\n\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; il seguente frammento di codice riempie la griglia Grid1 con le righe risultanti da una query dim q as new QWTable() q.database=form.GetDataBase() q.sql=&#8221;select TOP 10 CODICE,DESCRIZION from ARTIC&#8221; q.requestlive=false q.active=true q.rowset.first() while not q.Rowset.Endofset form.FindControl(&#8220;Grid1&#8221;).AddRow() form.FindControl(&#8220;Grid1&#8221;).AssignField(&#8220;CUSTOM1&#8221;,q.rowset.fields(&#8220;CODICE&#8221;).value) form.FindControl(&#8220;Grid1&#8221;).AssignField(&#8220;CUSTOM2&#8221;,q.rowset.fields(&#8220;DESCRIZION&#8221;).value) form.FindControl(&#8220;Grid1&#8221;).SaveRow() q.rowset.next() End while form.FindControl(&#8220;Grid1&#8221;).MoveFirst() q.active=false<\/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\/29995"}],"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=29995"}],"version-history":[{"count":2,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29995\/revisions"}],"predecessor-version":[{"id":29997,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/29995\/revisions\/29997"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=29995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=29995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=29995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}