Skip to Content
author's profile photo Former Member
Former Member

TableView with DropDownList Box

Hello Experts,

I am trying to pull a drop down list box into a table view. The table already contains data, so I need the initial value to be pulled in to the field. I want the user to be able to possibly change the value using a drop down list box. I can get an input box to work but not a drop down list box. Here is my code:

<htmlb:tableView id = "Prescription"

headerText = "Prescriptions"

headerVisible = "true"

design = "alternating"

table = "<%= zzscript_fin %>" >

<htmlb:tableViewColumns>

<htmlb:tableViewColumn columnName = "vetid"

title = "Vet"

type = "User" >

<htmlb:dropdownListBox id = "$TVCID$"

table = "<%= wa_vets %>"

selection = "$VETID$"

nameOfKeyColumn = "VETID"

nameOfValueColumn = "VETNAME" />

</htmlb:tableViewColumn>

<htmlb:tableViewColumn columnName = "issued"

type = "User"

title = "Issue Date" >

<htmlb:inputField id = "$TVCID$"

invalid = "false"

value = "$ISSUED$"

size = "10"

maxlength = "20"

type = "Date"

showHelp = "true"

firstDayOfWeek = "2" />

</htmlb:tableViewColumn>

</htmlb:tableViewColumns>

The dropdown list <u>does</u> contain values, so I know it works, but the initial value is set to the first value in the dropdown table, not the overall table.

Thanks in advance,

Nicole

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 04:57 AM

    Hi Nicole,

    You will have to use an iterator to get things working here...

    For more on iterator refer to the following two blogs :

    1) <a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator Basics : By Brian</a>

    2) <a href="/people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators Advanced : By Thomas</a>

    Hope this helps.

    <b><i>Do reward each useful answer..!</i></b>

    Thanks,

    Tatvagna.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.