Combo box in table

Hi,
I have a combo box in table.
In my table i have 5 Rows with 3 column and in 3rd column i have my combo box.
Now my problem is i want to set my own value in combo box but when i write:
comboBox.setvalue(3)
then it update all the combo box in each row with the same value.
I want to update my combo with different value in each row.
Thanks,

Where is the data for table coming from?
Possible duplicate of [url http://forums.oracle.com/forums/thread.jspa?threadID=2205385]this post
Sireesha

Similar Messages

  • Add combo box into table pagination

    I want to add combo box into JavaFX table with pagination. Something like that:
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Pagination;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class MainApp extends Application
       final ObservableList<Person> data = FXCollections.observableArrayList(
       new Person("1", "Joe", "Pesci"),
       new Person("2", "Audrey", "Hepburn"),
       new Person("3", "Gregory", "Peck")
       private Pagination pagination;
       public static void main(String[] args) throws Exception
      launch(args);
       public int itemsPerPage()
       return 1;
       public int rowsPerPage()
       return 5;
       public VBox createPage(int pageIndex)
       int lastIndex = 0;
       int displace = data.size() % rowsPerPage();
       if (displace > 0)
      lastIndex = data.size() / rowsPerPage();
       else
      lastIndex = data.size() / rowsPerPage() - 1;
       VBox box = new VBox(5);
       int page = pageIndex * itemsPerPage();
       for (int i = page; i < page + itemsPerPage(); i++)
       TableView<Person> table = new TableView<>();
       TableColumn numCol = new TableColumn("ID");
      numCol.setCellValueFactory(
       new PropertyValueFactory<Person, String>("num"));
      numCol.setMinWidth(20);
       TableColumn firstNameCol = new TableColumn("First Name");
      firstNameCol.setCellValueFactory(
       new PropertyValueFactory<Person, String>("firstName"));
      firstNameCol.setMinWidth(160);
       TableColumn lastNameCol = new TableColumn("Last Name");
      lastNameCol.setCellValueFactory(
       new PropertyValueFactory<Person, String>("lastName"));
      lastNameCol.setMinWidth(160);
      table.getColumns().addAll(numCol, firstNameCol, lastNameCol);
       if (lastIndex == pageIndex)
      table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + displace)));
       else
      table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + rowsPerPage())));
      box.getChildren().add(table);
       return box;
       @Override
       public void start(final Stage stage) throws Exception
      pagination = new Pagination((data.size() / rowsPerPage() + 1), 0);
       // pagination = new Pagination(20 , 0);
       //pagination.setStyle("-fx-border-color:red;");
      pagination.setPageFactory(new Callback<Integer, Node>()
       @Override
       public Node call(Integer pageIndex)
       if (pageIndex > data.size() / rowsPerPage() + 1)
       return null;
       else
       return createPage(pageIndex);
       public static class Person
       private final SimpleStringProperty num;
       private final SimpleStringProperty firstName;
       private final SimpleStringProperty lastName;
       private Person(String id, String fName, String lName)
       this.firstName = new SimpleStringProperty(fName);
       this.lastName = new SimpleStringProperty(lName);
       this.num = new SimpleStringProperty(id);
       public String getFirstName()
       return firstName.get();
       public void setFirstName(String fName)
      firstName.set(fName);
       public String getLastName()
       return lastName.get();
       public void setLastName(String fName)
      lastName.set(fName);
       public String getNum()
       return num.get();
       public void setNum(String id)
      num.set(id);
    I suppose that this can be done with StackPane but I need some other more universal way to do this because I want to expand the table size. I need to place there the combo box always in a fix position.
    Ref http://stackoverflow.com/questions/21147261/add-combo-box-into-table-pagination

    Hi. You can do it using an AnchorPane:
    AnchorPane.setBottomAnchor(comboBox, 40.0);
    AnchorPane.setLeftAnchor(comboBox, 12.0);
    The complete  example :
    import java.util.List;
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ListChangeListener;
    import javafx.collections.ListChangeListener.Change;
    import javafx.collections.ObservableList;
    import javafx.scene.Scene;
    import javafx.scene.control.Pagination;
    import javafx.scene.Node;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class TablePager extends Application {
        final ObservableList<Person> data = FXCollections.observableArrayList(
                new Person("1", "Joe", "Pesci"),
                new Person("2", "Audrey", "Hepburn"),
                new Person("3", "Gregory", "Peck"),
                new Person("4", "Cary", "Grant"),
                new Person("5", "De", "Niro"),
                new Person("6", "Katharine", "Hepburn"),
                new Person("7", "Jack", "Nicholson"),
                new Person("8", "Morgan", "Freeman"),
                new Person("9", "Elizabeth", "Taylor"),
                new Person("10", "Marcello", "Mastroianni"),
                new Person("11", "Innokenty", "Smoktunovsky"),
                new Person("12", "Sophia", "Loren"),
                new Person("13", "Alexander", "Kalyagin"),
                new Person("14", "Peter", "OToole"),
                new Person("15", "Gene", "Wilder"),
                new Person("16", "Evgeny", "Evstegneev"),
                new Person("17", "Michael", "Caine"),
                new Person("18", "Jean-Paul", "Belmondo"),
                new Person("19", " Julia", "Roberts"),
                new Person("20", "James", "Stewart"),
                new Person("21", "Sandra", "Bullock"),
                new Person("22", "Paul", "Newman"),
                new Person("23", "Oleg", "Tabakov"),
                new Person("24", "Mary", "Steenburgen"),
                new Person("25", "Jackie", "Chan"),
                new Person("26", "Rodney", "Dangerfield"),
                new Person("27", "Betty", "White"),
                new Person("28", "Eddie", "Murphy"),
                new Person("29", "Amitabh", "Bachchan"),
                new Person("30", "Nicole", "Kidman"),
                new Person("31", "Adriano", "Celentano"),
                new Person("32", "Rhonda", " Fleming's"),
                new Person("32", "Humphrey", "Bogart"));
        private Pagination pagination;
        public static void main(String[] args) throws Exception {
            launch(args);
        public int itemsPerPage() {
            return 1;
        public int rowsPerPage() {
            return 5;
        public VBox createPage(int pageIndex) {
            int lastIndex = 0;
            int displace = data.size() % rowsPerPage();
            if (displace > 0) {
                lastIndex = data.size() / rowsPerPage();
            } else {
                lastIndex = data.size() / rowsPerPage() - 1;
            VBox box = new VBox();
            int page = pageIndex * itemsPerPage();
            for (int i = page; i < page + itemsPerPage(); i++) {
                TableView<Person> table = new TableView<Person>();
                TableColumn numCol = new TableColumn("ID");
                numCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("num"));
                numCol.setMinWidth(20);
                TableColumn firstNameCol = new TableColumn("First Name");
                firstNameCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("firstName"));
                firstNameCol.setMinWidth(160);
                TableColumn lastNameCol = new TableColumn("Last Name");
                lastNameCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("lastName"));
                lastNameCol.setMinWidth(160);
                table.getColumns().addAll(numCol, firstNameCol, lastNameCol);
                if (lastIndex == pageIndex) {
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + displace)));
                } else {
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + rowsPerPage())));
                box.getChildren().addAll(table);
            return box;
        @Override
        public void start(final Stage stage) throws Exception {
            ObservableList<String> options =
                    FXCollections.observableArrayList(
                    "Opt1",
                    "Opt2",
                    "Opt3");
            final ComboBox comboBox = new ComboBox(options);
            pagination = new Pagination((data.size() / rowsPerPage() + 1), 0);
            //   pagination = new Pagination(20 , 0);
            pagination.setStyle("-fx-border-color:red;");
            pagination.setPageFactory(new Callback<Integer, Node>() {
                @Override
                public Node call(Integer pageIndex) {
                    if (pageIndex > data.size() / rowsPerPage() + 1) {
                        return null;
                    } else {
                        return createPage(pageIndex);
            AnchorPane anchor = new AnchorPane();
            AnchorPane.setTopAnchor(pagination, 10.0);
            AnchorPane.setRightAnchor(pagination, 10.0);
            AnchorPane.setBottomAnchor(pagination, 10.0);
            AnchorPane.setLeftAnchor(pagination, 10.0);
            Scene scene = new Scene(anchor, 400, 250);
            AnchorPane.setBottomAnchor(comboBox, 40.0);
            AnchorPane.setLeftAnchor(comboBox, 12.0);
            anchor.getChildren().addAll(pagination, comboBox);
            stage.setScene(scene);
            stage.setTitle("Table pager");
            stage.show();
        public static class Person {
            private final SimpleStringProperty num;
            private final SimpleStringProperty firstName;
            private final SimpleStringProperty lastName;
            private Person(String id, String fName, String lName) {
                this.firstName = new SimpleStringProperty(fName);
                this.lastName = new SimpleStringProperty(lName);
                this.num = new SimpleStringProperty(id);
            public String getFirstName() {
                return firstName.get();
            public void setFirstName(String fName) {
                firstName.set(fName);
            public String getLastName() {
                return lastName.get();
            public void setLastName(String fName) {
                lastName.set(fName);
            public String getNum() {
                return num.get();
            public void setNum(String id) {
                num.set(id);

  • Combo Box in a JTable not appearing

    Hi Swing,
    I have a snippet of code that I took from the Swing guide for JTables that adds a JComboBox into the 3rd column in the table. However, the ComboBox doesnt appear?
    Can anyone see what is going wrong? Code is below:- I can post more if needed:-
         public void addTable() {
              tableModel = new MyTableModel(rows,columns);
              relationTable = new JTable(tableModel);
           //Set up the editor for the sport cells.
            TableColumn sportColumn = table.getColumnModel().getColumn(2);                                              
            JComboBox allStaff = new JComboBox();
            allStaff.addItem("Snowboarding");
            allStaff.addItem("Rowing");
            allStaff.addItem("Knitting");
            allStaff.addItem("Speed reading");
            allStaff.addItem("Pool");
            allStaff.addItem("None of the above");
            sportColumn.setCellEditor(new DefaultCellEditor(allStaff));
              // set so only one row can be selected at once
              relationTable.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
              relationTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
              // add to pane:-
              JScrollPane scrollPane3 = new JScrollPane(relationTable);
              scrollPane3.setBounds(X,Y,Z,W);
              getContentPane().add(scrollPane3 );
         }Cheers

    hi
    look I will give u a simple code I created based on your combo box
    enjoy (:
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    public class TablCo extends JPanel {
    static JFrame frame;
    JTable table;
    DefaultTableModel tm;
    public TablCo() {
    super(new BorderLayout());
    JPanel leftPanel = createVerticalBoxPanel();
    //Create a table model.
    tm = new DefaultTableModel();
    tm.addColumn("Column 0");
    tm.addColumn("Column 1");
    tm.addColumn("Column 2");
    tm.addColumn("Column 3");
    tm.addRow(new String[]{"01", "02", "03", "Snowboarding"});
    tm.addRow(new String[]{"04 ", "05", "06", "Snowboarding"});
    tm.addRow(new String[]{"07", "08", "09", "Snowboarding"});
    tm.addRow(new String[]{"10", "11", "12", "Snowboarding"});
    //Use the table model to create a table.
    table = new JTable(tm);
              //insert a combo box in table
              TableColumn sportColumn = table.getColumnModel().getColumn(3);
              JComboBox allStaff = new JComboBox();
                   allStaff.addItem("Snowboarding");
                   allStaff.addItem("Rowing");
                   allStaff.addItem("Knitting");
                   allStaff.addItem("Speed reading");
                   allStaff.addItem("Pool");
                   allStaff.addItem("None of the above");
              //DefaultCellEditor dce = new DefaultCellEditor(allStaff);
              sportColumn.setCellEditor(new DefaultCellEditor(allStaff));
              JScrollPane tableView = new JScrollPane(table);
    tableView.setPreferredSize(new Dimension(300, 100));
              leftPanel.add(createPanelForComponent(tableView, "JTable"));
              JFrame.setDefaultLookAndFeelDecorated(true);
              //Create and set up the window.
              frame = new JFrame("BasicDnD");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              //Create and set up the content pane.
              frame.setContentPane(leftPanel);
              //Display the window.
              frame.pack();
              frame.setVisible(true);
              protected JPanel createVerticalBoxPanel() {
              JPanel p = new JPanel();
              p.setLayout(new BoxLayout(p, BoxLayout.PAGE_AXIS));
              p.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
              return p;
              public JPanel createPanelForComponent(JComponent comp,
              String title) {
              JPanel panel = new JPanel(new BorderLayout());
              panel.add(comp, BorderLayout.CENTER);
              if (title != null) {
              panel.setBorder(BorderFactory.createTitledBorder(title));
              return panel;
    public static void main(String[] args) {
         new TablCo();
    }

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

  • How can I code a lookup table from a combo box

    Hi, I am trying to use combo boxes on a front page which selects a desired gas.  I then want this to look up a simple 2D table which returns the associated K factor value to be used.  Essentially I need to gain the conversion factor for a selected gas to be used in the block diagram to adjust the outputs and inputs accordingly.  I tried to load an excel file into an array and then extract the desired numeric value but failed. Any help would be great.  I don’t want to be manually inputting the values in the block diagram because there are lots of them so it must be read in from a file of some sort.
    Regards

    Hello Sniepsy,
    You posted this question in the FieldPoint forum, but the
    question appears to have nothing to do with that hardware product.  I can’t deduce from your post what
    programming platform you are using, but I assume that it’s LabVIEW.  If so, you might consider reposting your
    question to the LabVIEW forum.
    I’ll broadly address your question though.  If the number of possible input factors is
    small (say in the order of less than 50), the easiest thing to do is just
    generate 2 1D arrays with one for keys, and one for values.  Make sure the indices match up and just look
    up the index of a key in array 1, and index array 2 with that to get your
    number.  A purist might complain that the
    lookup time would be linear, and we can achieve log-time with sorted lists and
    advanced structures – but since these aren’t in LabVIEW the overhead of
    implementing them might outweigh the benefit.
    Hope this helps! 
    Please let us know if you have further questions.
    Travis M
    LabVIEW R&D
    National Instruments

  • Access 2010 - How to display data from a table into a text box upon combo box selection?

    Hi
    I have a a table with 5 columns: month, year, USD, SGD, BAHT.
    I created a form with a combo box for selection of the month and year, and I would like to set adjacent text boxes to show USD, SGD, BAHT information. How can i go about doing that?
    From the Q&A here, most of them uses the function similar to this "=[Combo0].[Column](1)" to show the data in the text box, but this would require the combo box to list a whole bunch of details if i were to add in more currency values to the
    table. Is it possible to not show this information in the combo box, but still populate data in the textboxes base on a selection on only the "month" and "year" in the combo box.

    Hi,
    According to your description, my understanding is that you want to show only the month/year in the combo box, we can choose the date, and it will display the value of USD/SGD/BAHT based on the month/year.
    If it is, I recommend you try the steps:
    Create a form based on your data source table>Add the combo box>combo box wizard>Find a record on my form based on the value I selected my combo box>Add mouth and year to selected fields
    http://office.microsoft.com/en-us/access-help/create-a-list-of-choices-by-using-a-list-box-or-combo-box-HA010113052.aspx
    If I misunderstand something, please let me know. We may upload some screenshots or a sample through OneDrive.
    Regards,
    George Zhao
    TechNet Community Support

  • Combo box in a table column

    I have dragged and dropped one of my view objects as a table on a JClient form. Is there a way I can show one of the columns as a combo box?
    Milos

    URGENT!!!!!!!! Using a topic title like "URGENT" followed by exclamations is one sure way to not get an answer from people on the forum.
    This is urgent... Not for us it isn't. Implying that your question is any more important than any other question on the forum is another way to not get a response.
    Anyway your question is like big run on sentence and I have no idea what you are asking or what your problem is or what your code looks like.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Only Dimension Table Values in Combo Box or Drill Down Selections

    Hi All,
       How to get only Dimension Table Values instead of Master Data Values in Combo Box or Drill Down Box list of values?
    I am getting all the values in 0CALMONTH Combo Box where i need only infoproviders values.
    In Entry List tab of Combo Box when i select 0CALMONTH its reading from its Master Data.Is there any option how there is Dimension table in Value help.
    In Query, infoobject levels the filter values selection is set as infoprovider only.
    Can anyone please let me know how to get only dimension table values when we use combo box.
    Thanks & Regards
    K.Srinivas Rao

    Hi
    Create one BI query with only one object in the output of the query. (In your case 0CALMONTH)
    So now if when you run the query it will show values which are there in infoprovider. THen drag one form from output of this query in vc & create dropdown list on this.
    Is this what you are looking for?
    regards
    Sandeep

  • Linking combo boxes to a table

    I have made a set of combo boxes that allow the user to input a home and away football team and their scores. I have also setup a table with 4 teams in it. How can i link the combo boxes so that EG:
    If Arsenal 2 - 1 Chelsea is a result inputted how can i link it to a table so that Arsenal will go top with 3 points, 2 goal for, 1 against etc
    Basically i need to update the table from the info supplied by the combo boxes???

    we don't tolerate that attitude either....
    besides I gave u guidelines, check the other thread, but u can be sure that nobody will help you if u keep this attitude...
    READ the links I posted in that other thread, work on the issue then come back with questions and post your code so that we know how to help you based on your code..that's how it works here..

  • **urgent*** -two  combo boxes  -one  database table - ***urgent**

    1. i have one html page - in that two combo boxes are there
    2. first one called--> Bank Name and second one called-->Main Branch
    3. i have a database table like BANK_MASTER(MAIN_BRANCH,BANK_NAME)
    i am giving here some data for the above table:
    (sbi-kurnool, sbi),(sbi-cadapah,sbi),(sbi-chittor,sbi),(ab-rangareddy,ab),(ab-varangal,ab) ..like that every bank has its own main branch in different location.
    MY PROBLEM:
    In HTML page, in the first combo box ie., Bank Name will display all the bank name using the table BANK_MASTER ie.,sbi,ab,cb,sbh ...... (its ok - i too get )
    main Problem: Whenever i select a particular bank name in the first combo box, the second combo box ie.,Main Branch has to display the main branches using the table Bank_Master depending on the Selected bank name from the Bank Name Combo box ( ie., if we select the sbi, it has to display all main branches of sbi's only, but not other bank's main branches)

    Hi friend,
    I had a similar situation and i tried to solve it by using XmlHttpRequest Object(used in AJAX).
    U can checkout the below example just for further reference delete
    UserForm.jsp:
    ==========
    <head>
    <script>
    var xmlHttp
    function showState(str)
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    alert ("Browser does not support HTTP Request")
    return
    var url="getState.jsp"
    url=url+"?count="+str
    url=url+"&sid="+Math.random()
    xmlHttp.onreadystatechange=stateChange
    xmlHttp.open("GET",url,true)
    xmlHttp.send(null)
    function stateChange()
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
    document.getElementById("state").innerHTML=xmlHttp.responseText
    </head>
    <body>
    <select name='country' onchange="showState(this.value)">
    <option value='india>india</option>
    </select>
    <br>
    <div id='state'>
    <select name='state' >
    <option value='-1'>pickone</option>
    </select>
    </div>
    </body>       
    getState.jsp
    ============
    <%@page language="java" import ="java.util.Hashtable" import ="java.util.Set" %>
    <%
    String country=request.getParameter("count");
    response.setContentType("text/html");
    response.setHeader("Cache-Control","no-cache");
    try{
    Hashtable ht = (Hashtable)session.getAttribute("<ATTRIBUTE_NAME>");
    String buffer="<select name='state'><option value='-1'>Pick One</option>";
    Set s=ht.keySet();
    Object keys[]=s.toArray();
    int size=keys.length;
    for(int i=0; i < size;i++){
    buffer=buffer+"<option value='"+ht.get(keys).toString()+"'>"+ht.get(keys).toString()+"</option>";
    buffer=buffer+"</select>";
    response.getWriter().println(buffer);
    catch(Exception exp){
    response.getWriter().println(exp);
    %> I think u may go upon replacing country with your Main Branch and vice versa

  • Problem with editable combo box and creating dynamic table values using js

    Hai
    I have used jquery.jec.js to make my dropdown list as editable... I need to create dynamic table values on the onChange event of dropdown using javascript.
    Now am facing the problem in it...
    I am getting duplicate rows in the table... think(assumption) this jquery.jec.js is calling the dropdown again creating duplicate values...
    Please help me out.... Any help is appreciable... Thanks in advance

    Thanks elOpalo, for your valuable response....
    I have found the correct way of doing.
    Before i had my code like this,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>test</title>
    <script type="text/javascript" src="js/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery.jec.js"></script>
    <script type="text/javascript">
    $(function(){
    $('#list').jec();
    function giveAlert(){
         alert('hello');
    </script>
    </head>
    <body>
    <form>
    Combo Box:
    <select id="list" name="list" onChange="giveAlert();">
    <option value="1">one</option>
    <option value="2">two</option>
    </select>
    </form>
    </body>
    </html>
    Now i have changed as the following,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>test</title>
    <script type="text/javascript" src="js/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery.jec.js"></script>
    <script type="text/javascript">
    $(function(){
    $('select.combo').jec();
    $('select.combo')
    .change(function() {
    alert($(this).val());
    }).change();
    </script>
    </head>
    <body>
    <form>
    <table>
    <tr>
    <td>Combo Box:</td>
    <td><select class="combo"><option value="b">banana</option><option value="a">apple</option></select></td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    The problem is with the function i have called on the onChange Event.. Now i have defined it inside the jquery function of dropdown to make it as editable...

  • Populating a combo box using values in a table

    I am trying to populate a drop down box with values from a table. I have got so far.
    The combo box is populated however the values in the box are blank.
    Can some suggest the necessary modifications?
    $query="select distinct(house_type) from tbl_accommodation";
    $stmt = ociparse($conn, $query);
    ociexecute($stmt);
    echo '<select name="house_type">';
    echo '<option value = "-1">Select:</option>';
    while($row=ocifetch($stmt)) {
         echo '<option>' . $row['house_type'] . '</option>';
         echo '</select>';
    Thanks

    The ocifetch() function needs ociresult() to get the data. See
    http://us.php.net/manual/en/function.oci-result.php
    You might want to use oci_fetch_assoc() instead.
    while($row=oci_fetch_assoc($stmt)) {
      echo '<option>' . $row['HOUSE_TYPE'] . '</option>';
    }For associative arrays, use the column name in upper case.
    NB Oci_fetch_assoc() is a PHP 5 function. If you don't have it, then
    you are using PHP 4 which has a much older version of the OCI8
    extension. I'd recommend upgrading PHP, or just replacing the old
    OCI8 with a newer one. See other recent threads about how to do this.

  • Problem in showing combo box in the table

    Hello guys i just add up the combo box in the table but the problem is when i change the line in the table the combo disappear. i want it to be visible even if it is not in the selected row. i want that user can see the combo box in the table without clicking on it.
    Please help;

    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    Look in the page bottom !

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

  • Combine table 3 columns in a combo box?

    I need a combo box to display "lastName, firstName - phone".
    I have these 3 columns in my database. Can anyone provide a short
    cfc to xml script I could use to create an arrayCollection to use
    as a dataprovider for my combobox?
    I'm thinking along the lines of a CFQUERY in a cfc, then
    exporting the results to an xml structure and using the xml as an
    array collection. I just don't know how to do the cfc -> xml.
    Any alternative solutions are welcome also. thanks

    Bleh, double posted this due to forum maintenance.

Maybe you are looking for

  • I keep getting an error when exporting. Help

    I have been trying to export a video, and when ever is 1/2 way it gives me a system error. Can anyone help? thanks. G5 2.3Ghz   Mac OS X (10.4.1)  

  • Photoshop slideshow:love/hate some features-what's the best approach??

    Trying to create a slideshow for graduating class. Have created slideshow with photoshop 4.0. What I liked: pan and zoom feature which I use a lot is easywith lots of control. What I didn't like: not be able to fade music, pixelation of some pics (on

  • MiniStore dialog box won't go away

    I want to get rid of the MiniStore dialog box, because it needlessly takes up space in my iTunes window. The Apple article says, "The first time you launch iTunes 6.0.2 the MiniStore displays a dialog box that explains the MiniStore and asks you if y

  • /usr/lib/libjpeg.so.62 seems to be missing

    After an upgrade, various applications, such as KDE, Amarok, and wine complained about libjpeg.so.62 missing. I checked /usr/lib...and libjpeg.so.62 is missing, even though I have libjpeg installed. How do I fix this?

  • No "Specific Information" Allowed???

     I have tried calling Comcast Customer Service and talking with their billing department, but they refused to give me any information that could help my 91-year-old grandfather. I wasn't even asking about specific information about his bill! He got a