Dropdown where first element is dinamic and dont duplicate the item?

7 views
Skip to first unread message

artjc

unread,
Jan 28, 2010, 8:38:32 PM1/28/10
to asp-ajaxed, ga...@gmx.at
I need to create a dropdown in a recordset, where the initial element
selected comes from another sql query. The goal is to edit data loaded
from a DB.

What I did was create a normal dropdown and parameters
commonField ....., I made a call to a function that returns the
values.

<code>
. commonFieldText = initialValue ( "cat", "text")
. commonFieldValue = initialValue ( "cat", "value")
</code>

This works but the problem is that twice the first data with that used
in the query dropdown.

How can I create a dropdown, where the first element is a query from
another table and do not duplicate the item?

my code:

<code>
sub drawCategory()
with new Dropdown
.datasource = "SELECT * FROM PreguntaClasCategoria ORDER BY
categoria"
.dataTextField = "categoria"
.dataValueField = "idCategoria"
.name = "cat"
.commonFieldText = initialValue("cat", "text")
.commonFieldValue = initialValue("cat", "value") ' ""
.draw()
end with
end sub

</code>

Tenorio

unread,
Feb 1, 2010, 7:31:40 AM2/1/10
to asp-ajaxed
You do speak Portuguese right? You can send me a message in PVT
explaining this better if you wish.

Tenorio.

Reply all
Reply to author
Forward
0 new messages