
(RSS) |
Nitobi User Forums Nitobi Support Forums
|
Please take our Customer Satisfaction Survey
| View previous topic :: View next topic |
| Author |
Message |
authors
Joined: 20 Aug 2008 Posts: 5
|
Posted: Tue Sep 09, 2008 9:51 pm Post subject: Alternative to InitialSearch |
|
|
I'm trying to populate a databound combobox on it's initial load. Currently the combobox has several columns the first column contains the name of the item, the 2nd and 3rd column contain "qualifiers". An example:
| Code: | Column A Column B Column C Column D
Paris France Europe 1
Paris Texas North America 2 |
When a user selects a row the text of the combo is a combination of all three columns to avoid ambiguity so: "Paris (France, Europe)". When they submit the form the ID stored in column D is saved.
My question is how can I populate the initial value at a later date? The text of the combobox is "Paris (France, Europe)" but that is of course a combination of values and doesn't exist in the DB as a single, queryable value. Parsing the string is too unreliable as the formatting is liable to change.
Ideally what I want to do is to submit the ID I stored originally when this row was selected. That's the only way of accurately selecting the row. I can't see of any way to populate the combobox though without using InitialSearch.
I hope that makes sense and that you can help. |
|
| Back to top |
|
 |
Fil_Nitobi Site Admin
Joined: 18 Aug 2008 Posts: 30 Location: Nitobi Office
|
Posted: Mon Sep 15, 2008 11:25 pm Post subject: |
|
|
Hi authors,
Unfortunately, your post did confuse me :P. Could you clarify a bit on what you are trying to do? If I understand correctly, you have the combo box in a form, and when the form is submitted, the ID value of the selected row in the combo is saved... somewhere.
Do you simply want to change the combo box display text? You can programatically access the text values in the combo with:
| Code: |
alert(nitobi.getComponent('myComboID').GetTextValue());
nitobi.getComponent('myComboID').SetTextValue('new text');
|
In the above, you would change 'myComboID' to whatever ID you assigned your combo component.
If that's not what you were looking for, just reply here and we'll go from there.
Best,
Fil
Junior Web Software Engineer |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|