<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Bind combo box with data and display results in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/bind-combo-box-with-data-and-display-results/m-p/754395#M20006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, I am developing a simple application that contains 2 drop down lists, namely, products as well as price list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The product drop down list has 4 options and how do I bind this drop down list with the values in the table so that I do not need to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pre-define the values. Additionally, this is also useful in the future because if there are new products, I can simply update the database &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and the values will be automatically reflect in the drop down list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a sample code that binds drop-down list with data from the database. Is this set of code suitable of for the web form in &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcGIS? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.DataSource =&amp;nbsp; Product_Table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.DataSource.DataTextField = ???Product_Name???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.DataSource.DataValueField = ???Product_Name???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.Databind()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second to retrive records from the database,&amp;nbsp; I have generated a sql statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Secondly, the first field is mandatory while the price list is optional. This means the user can perform 2 types of search.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;??? Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;??? Product + Price List&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the SQL statement that I have generated:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select * from Product_Table where Product_Name = ???Printers??? OR ??? Scanners??? OR ???Laptops??? AND Price_List = ???100-200??? OR ???200-400??? OR ???400-600??? OR ???600-800??? OR ???800-1000??? OR ??????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do i populate display results in data view because i tried to search for codes but cant find any&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Becky&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Apr 2013 01:30:47 GMT</pubDate>
    <dc:creator>BeckyZhuge_Rou</dc:creator>
    <dc:date>2013-04-19T01:30:47Z</dc:date>
    <item>
      <title>Bind combo box with data and display results</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/bind-combo-box-with-data-and-display-results/m-p/754395#M20006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, I am developing a simple application that contains 2 drop down lists, namely, products as well as price list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The product drop down list has 4 options and how do I bind this drop down list with the values in the table so that I do not need to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pre-define the values. Additionally, this is also useful in the future because if there are new products, I can simply update the database &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and the values will be automatically reflect in the drop down list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a sample code that binds drop-down list with data from the database. Is this set of code suitable of for the web form in &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcGIS? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.DataSource =&amp;nbsp; Product_Table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.DataSource.DataTextField = ???Product_Name???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.DataSource.DataValueField = ???Product_Name???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ddlProduct.Databind()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second to retrive records from the database,&amp;nbsp; I have generated a sql statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Secondly, the first field is mandatory while the price list is optional. This means the user can perform 2 types of search.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;??? Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;??? Product + Price List&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the SQL statement that I have generated:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select * from Product_Table where Product_Name = ???Printers??? OR ??? Scanners??? OR ???Laptops??? AND Price_List = ???100-200??? OR ???200-400??? OR ???400-600??? OR ???600-800??? OR ???800-1000??? OR ??????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do i populate display results in data view because i tried to search for codes but cant find any&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Becky&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 01:30:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/bind-combo-box-with-data-and-display-results/m-p/754395#M20006</guid>
      <dc:creator>BeckyZhuge_Rou</dc:creator>
      <dc:date>2013-04-19T01:30:47Z</dc:date>
    </item>
  </channel>
</rss>

