Using a GetHandler with Combo

A getHandler is the page that delivers properly formatted XML data to the ComboBox. The ComboBox calls the getHandler repeatedly as the user types to retrieve the correct list of records.

The ComboBox sends special querystring parameters to the getHandler. A typical request might look like:

get.cfm?StartingRecordIndex=12&PageSize=12 &SearchSubstring=a&ComboId=myCombo&LastString=Arlene

These parameters help you build your SQL select statement; for a complete explanation of these parameters, see our articles on construcing SQL queries for Combo.

Writing your GetHandler

Please see the appropriate article for your server platform:

The Combo Tag

Now on the HTML side, here is an example of a Combo tag that would bind to this data.

<ntb:Combo id="myCombo" Mode="filter">
  <ntb:ComboTextBox DataFieldIndex=0></ntb:ComboTextBox>
  <ntb:ComboList DatasourceUrl="get.cfm" PageSize="5">
    <ntb:ComboColumnDefinition HeaderLabel="Customer Name" DataFieldIndex=0 >
    </ntb:ComboColumnDefinition>
    <ntb:ComboColumnDefinition HeaderLabel="Customer eMail" DataFieldIndex=2>
    </ntb:ComboColumnDefinition>
  </ntb:ComboList>
</ntb:Combo>

Notice in this tag the the first column (Customer Name) has DataFieldIndex = 0 meaning it will bind to the first data column (CustomerName). The second column we defined here (Customer eMail) is bound to DataFieldIndex = 2, meaning the 3rd column of data (CustomerEmail).

page_revision: 1, last_edited: 1224630053|%e %b %Y, %H:%M %Z (%O ago)
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License