Nitobi
Customer Login
Services
Products
About
Blogs
Contact
Home -> Product Knowledgebase Order Online | Free Trial Downloads

Nitobi Product Knowledgebase

Setting the Initial Combo Value


There are two ways to set the initial value with ComboBox V3. One way is to set the value of the textbox. However, if your data is complex with multiple columns, or you want to pick from the actual dataset, you will want to use the new InitialSearch feature.

Method 1: Set the Textbox Value

Use the Value attribute in the ComboTextBox tag. Note that this merely sets the value contained by the textbox, and does not actually select an item from the list.

eg:

<ntb:ComboTextBox Width="200px" Value="Some text" DataFieldIndex=0 > </ntb:ComboTextBox>

Method 2: Setting the InitialSearch (Selecting a value from the dataset)

In many cases, we need to actually select a record from the dataset. How do we choose a record from a dynamic recordset without:

  1. Without writing new serverside code to look for a specific record
  2. Without knowing the record information at runtime?

The answer is InitialSearch. This is like pre "typing" a string into the textbox, and then selecting the most likely result. Therefore it is not necessary to write out the entire string. Even 1 letter is enough to select a record, but the more letters you type of the string, the more accurate the selection will be.

InitialSearch is part of the Combo tag.

eg:

<ntb:Combo id="cmbCustomers" Mode="filter" InitialSearch="Rosalyn">
    <ntb:ComboTextBox Width="250px" DataFieldIndex=0>
    </ntb:ComboTextBox>
</ntb:Combo>

Related Articles

View Printable Version

Comments:


Name:

Type the text you see above:

Comments:


Knowledgebase

To be notified of new articles when they're available, subscribe to our RSS feed.

Support Resources

Take advantage of our knowledgebase of product tutorials and tips, and our support forums!

Search Site


Sign up for our Newsletter:

Get industry articles and Nitobi company news in your inbox every couple of months — here's a sample!

Email:




Site RSS Feed  | All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved