{"id":24984,"date":"2018-03-21T17:32:27","date_gmt":"2018-03-21T16:32:27","guid":{"rendered":"http:\/\/help.qualiware.it\/qw-help\/?p=24984"},"modified":"2024-08-02T10:41:32","modified_gmt":"2024-08-02T08:41:32","slug":"alimentazione-dei-valori-una-tendina-di-una-combobox-aggiunta-su-una-maschera-aspx","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/alimentazione-dei-valori-una-tendina-di-una-combobox-aggiunta-su-una-maschera-aspx\/","title":{"rendered":"Alimentazione dei valori una tendina di una ComboBox aggiunta su una maschera ASPX"},"content":{"rendered":"<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">' Il seguente snippet pu\u00f2 essere utilizzato per alimentare la tendina di un oggetto ComboBox aggiunto su una maschera ASPX.\r\n' Il seguente snippet va inserito nell'evento di creazione dell'oggetto.\r\n' L'esempio si riferisce al form GEMANOCO2.ASPX. \r\n\r\nDim form As gemanoco2 = this.page\r\nDim q as QWTable\r\ndim myDBArray as New DBArray\r\nDim c as QWWebControls.QWWebCombo = CType(this.page, QWWebControls.QWWebPage).FindControl2(\"CUSTOM_1\")\r\nc.ToolTip = \"Fasi di lavorazione\"\r\n                                               \r\n'\/\/ Legge il codice delle fasi di lavorazione  in CAUSPAR \r\nq = new QWTable()\r\nq.database = form.form_state.dmd_ref.DB\r\nq.sql = \"select CODICE, DESCRIZION from CAUSPAR where CODICE like 'FALAV%' and CODICE &lt;&gt; 'FALAV' \"\r\nq.requestlive = false\r\nq.active = true\r\nq.rowset.first()\r\n                               \r\nDo while not q.rowset.endofset\r\n   If Not empty(q.rowset.fields(1).value) and not empty(q.rowset.fields(2).value)  then\r\n      c.Addvalue(q.rowset.fields(1).value,q.rowset.fields(2).value)\r\n   End if\r\n   q.rowset.next()\r\nLoop\r\nq.active = false\r\nq.dispose()\r\n\r\nif NOT form.isPostback()\r\nform.refreshcontrols()\r\nend if\r\n                               \r\n' Ridefinisce l'handler dell'evento valuechanged della combobox\r\n' Questa parte di codice va inserita solamente se si vuole gestire l\u2019evento ValueChanged\r\n\r\nAddHandler c.ValueChanged,\r\n     Sub(sender As Object, e As Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs)                              \r\n        ' Inserire qui l'azione da eseguire al cambiamento del valore \r\n     End Sub\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &#8216; Il seguente snippet pu\u00f2 essere utilizzato per alimentare la tendina di un oggetto ComboBox aggiunto su una maschera ASPX. &#8216; Il seguente snippet va inserito nell&#8217;evento di creazione dell&#8217;oggetto. &#8216; L&#8217;esempio si riferisce al form GEMANOCO2.ASPX. Dim form As gemanoco2 = this.page Dim q as QWTable dim myDBArray as New DBArray Dim c&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":[78],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/24984"}],"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=24984"}],"version-history":[{"count":2,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/24984\/revisions"}],"predecessor-version":[{"id":37386,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/24984\/revisions\/37386"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=24984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=24984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=24984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}