Data grid combo box

how can i add a combo box in to the Data grid when i click the add button.
when i add  the second row what i have selected before is refreshed.
please help me

The data property of the item renderer corresponds to the
item the item renderer renders (a lot of repetitions here... :-).
But when your application starts, the data property of your
item renderer is null. Still, the code is executed. So you get a
null pointer exception.
How to solve this problem ?
Use databinding within the item renderer in order to detect
the data value change from null to an object value:
<mx:Binding source="{this.data}"
destination="onDataChanged" />
private function set onDataChanged(value:Object):void
if(value)
// Do something if value is non-null
Voila !
No more errors.
Since the item has a type in the dataprovider of my datagrids
in my projects, I cast the data property to an explicit type before
accessing the item properties:
E.g
(this.data as Product).ISBN

Similar Messages

  • Issues with Data Grid Combo Boxes

    Hi,
    I am trying to implement, 3 combo boxes for each row in extended data grid but unable to find the solution. Can someone please help?
    Problem in detail:
    The issue is after populating the data grid i want to give users 3 options  using 3 combo boxes(i.e each row in data grid will now have 3 options , which is basically converting 1 row into 3 rows with 3 options),so that they are able to do their computations.
    This is reallly urgent, any help would be highly appreciated.
    Thanks & Regards
    Pankaj

    "In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
    In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
    "Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
    The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
    "I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
    On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
    I use version 1.0.0.15.57 and seems to be working allright.
    - Babu Rangasamy

  • How to retrieve data in Combo box?

    :mad; I need to do a form for delivery order. Just fill some
    personal data and order of product. Inside I have some combo box of
    product, but I need save the record into txt file (just once time)
    then need to retrieve the data from txt file onto combo box. I have
    attached the code, I don't know which part got wrong, anybody who
    get help me?

    "roy16" <[email protected]> wrote in message
    news:[email protected]...
    >
    I need to do a form for delivery order. Just fill
    some personal data
    > and
    > order of product. Inside I have some combo box of
    product, but I need
    > save the
    > record into txt file (just once time) then need to
    retrieve the data from
    > txt
    > file onto combo box. I have attached the code, I don't
    know which part got
    > wrong, anybody who get help me?
    >
    > Combo box code :
    > controls := wcGetControlList()
    > listing := "Choose an Item"^Return^"Hot
    > Chocholate"^Return^"Tea"^Return^"Coffee"^Return^"Low fat
    > Milk"^Return^"Full
    > Cream Milk"^Return^"Orange Juice"^Return^"Purified
    Water"
    > id_list := wcDisplayControl(350, 350, 150, 21,
    "ComboBox", "wcS")
    > propList := wcGetPropertyList(id_list)
    >
    >
    > Save the data from Combo box list :
    > data := wcGetPropertyValue(id_list, "value")^Return
    data at this point will be some number between 0 and 7 and
    your appended
    return.
    > WriteExtFile("list2.txt", data)
    >
    > Read the data from txt :
    > data := ReadExtFile("list2.txt")
    This will again be a string that contains a number and a
    return.
    > Convert string to list :
    > id_list := [:]
    Before, you are populating id_list with a single number that
    is the _ID_ of
    the winCtrl . Now, you are changing it to an empty property
    list. Why?
    > AddProperty(data^id_list,controls ,GetLine(data,1))
    The first parameter of AddProperty is supposed to be the name
    of a variable
    which is a property list. As such, you couldn't use a
    concatenated
    expression there. Even if you could, an Authorware variable
    cannot begin
    with a number, which data always will in this instance. It
    also cannot
    contain a return. _And_ the characters "[:]" are not valid
    parts of a
    variable name either. Next, you're trying to add a property
    that looks
    something like:
    "Button\rCheckBox\rCheckListBox\rColorCombo\rComboBox\rDriveCombo\rEdit..."
    While a property list _can_ have strings instead of symbols
    as the keys to
    the values, this is not documented or officially supported.
    Even if it
    were, you _cannot_ have a key with returns in it, and I have
    no idea why
    you'd want to!
    Here are the steps you should be using:
    1) Create your WinCtrl and store its ID in a regular numeric
    value (I'll
    call it wcID for convenience)
    2) Set its Items property to listing.
    3) Check for the existence (FileType) of your file with the
    value of the
    winCtrl in it. If it exists, set the value property of wcID
    to the contents
    of the file.
    4) You're using wcS as your change event, so set up a
    conditional on false
    to true with wcS as the condition.
    5) Inside that response, write the "value" property (without
    the return) of
    the wcID control to file.
    HTH;
    Amy

  • Filtering of Data through Combo Box with chart drill down Option.

    Hey Guys,
    I need to ask one thing about combo box filtering option, i want to filter my data like country, agent, customer and in the end material. I have achieved this through filter component but the thing which bother me is that if i select the specific customer in filter option it directly give's input to other filter's which i don't want. So the alternate is combo box but the thing which is creating problem is that if i filter my data through combo box it doesn't give any option for the chart filtering. For more convenience i am attaching my spreadsheet data which i want to filter.  please help me in this matter.
    Thanks & Best Regards,
    Hassan Ali.
    Sample Is Below::
    Country
    Customer
    Material
    Austria
    David
       Mat 1
    Austria
    Simon
       Mat 2
    China
    XYI jo
       Mat 2
    China
    CHU pa
       Mat 4
    India
    Suresh
       Mat 1
    India
    Ramesh
       Mat 5
    Sales Quantity
    Export Sales
    300.000 FT2
    1,631,020.77 PKR
    600.000 FT2
    3,108,107.67 PKR
    600.000 FT2
    11,917,131.08 PKR
    200.000 FT2
    8,679,817.14 PKR
    760.000 FT2
    8,059,453.23 PKR
    790.000 FT2
    1,727,072.16 PKR

    Nothing to do with excel file, just the logic with combo box.

  • How to display data in combo box from xml file.

    Hi All,
            I have the data in xml file.
      <jukebox>
        <song>
            <title>When the Levee Breaks</title>
            <artist>Kansas Joe and Memphis Minnie</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Better Leave that Stuff Alone</title>
            <artist>Will Shade</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Walk Right In</title>
            <artist>Cannon's Jug Stompers</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
    </jukebox>
    and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
    Can any one help me.
    thanks
    Raghu.

    Raghuvasa,
    Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
    combo.dataProvider = jukebox.song.url
    or as a shortcut
    combo.dataProvider = jukebox.descendants("url")
    The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
    Richard

  • How do I retrieve data from combo boxes?

    The past weekend I spent my whole weekend trying to find this
    out and gone through the top 10 pages on google trying all sorts of
    things. I would be grateful for anyone who can help me.
    I have 6 combo boxes in a booking form and I need to retrieve
    the data when someone click submits which gets forwarded on to php
    then my mailbox. They are called box1_cb, box2_cb.....box6_cb All
    in the instance of: ComboBox - which I don't understand what that
    does.
    it does not seem to be retrieving any of the data. For each
    combo box:
    I have the the options people can choose form in "Labels" box
    under "Paramaters", nothing for "Data", Row Count is 8 and nothing
    for "Change Handler" which I don't know what it does.
    Can anyone please provide some help with telling me what
    "change handler" does, do I need the data for each combo box in the
    "Labels" parameter as well as the "Data" box, what an instance does
    (for combo boxes) and what I need to put in the actionscript for
    the submit button as well as do i need to put code in the
    actionscript for each combo box?
    The options people can choose from in the combo boxes are
    there when someone views the site.
    Can anyone please help me..I would greatly appriciate it.
    Thanks.

    If your hard drive can be detected and shows up as a drive letter in my computer but you can't access your files,then you can recover your data off it with data recovery software easily.This way is the easiest and the most inexpensive way to recover your data.If you bring it to a computer repair shop that is available for data recovery servise,they will cost you $500-1000 or more.Hmm, a lot of money.
    I managed to recover data from crashed hard drive with Tenorshare Data Recovery.If needed,you can download it and scan your hard drive for free to preview whether your data can be recovered.It will show you thumbnails for recoverable pictures.

  • Cant get Data in Combo Box of Udo

    Hi
    I made one Master Table..then i made User defined field and i linked that field with a table of no object type. Then i registered the UDO of that Master Table.
    Then i generate teh form of UDO from SAP b1 UDO FORM GENERATOR. when i saw that form in screen painter then it didnt show the combo box for the field which i linked with no object type table.
    i change the type of field in xml file..then its showing the combo box in screen painter but i am unable to get how to link it with table.
    can anybody tell why its happen and how to correct it.
    Thanks
    Rupinder

    Hi..
         Combobox in udf u have to select  set valid values there give ur combo data
    Regards...
    Billa 2007

  • To filter data in two dates using combo box component

    Hi,
    I have a requirement like, i need to filter data in chart between two dates from two combo box.. From combo_box and To combo_box.
    I am using one QaaWS to populate LOV's into Combo box's and another QaaWS for chart data. Universe is the same one on SAP  BI query.
    LOV's are populating into both combo's and chart as well, i used a query refresh button after choosing two dates and press button.
    Data is not reflecting as per the choice of dates.
    If any one have such scenario, request you to share the same....
    Thanks in advance...
    Raj..

    Problem is with ranges, not with dates, my data is working fine with CALDAY (in BI Query)....
    My query variable is on FiscalPeriod month, like "FEB 2011"  to "OCT 2011" and is optional, but it is fails in QaaWS to execute when i try to input any months.
    If we give default values in BI query format is like K4/010.2011 for october month. QaaWS doesnt fail and executes, but if i change any value in QaaWS it is taking as "OCT 2011"
    And in Xcelsius it is not recognizing eaither of the formats like, K4/010.2011 or "OCT 2011"
    the format is not matching with xcelsius.

  • Grid Combo Box

    I took the code for creating a combo box inside the grid but I have a problem when I change the label of the column that attached to the combo box. It gave me error about identifier not found.
    The setDataItemName method I didn't touch it.
    any idea ,.. appreciated.
    DT
    public class myGridComboBox1 extends ComboBoxControl {
    public myGridComboBox1(ScrollableRowsetAccess m_Rs, JTable m_Table, String
    grid_columnName, String combo_columnName ) {
    int rowCount = m_Rs.getRowCount();
    Object comboData[] = new Object[rowCount];
    try{
    for (int iRow=0; iRow<rowCount; iRow++){
    m_Rs.absolute(iRow+1);
    ImmediateAccess ia =
    (ImmediateAccess)m_Rs.getColumnItem(combo_columnName);
    String str = ia.getValueAsString();
    comboData[iRow] = str;
    }catch(Exception e){
    e.printStackTrace();
    // get reference to a column
    TableColumn customColumn = m_Table.getColumn(grid_columnName);
    // custom TableCellRenderer
    TableCellRenderer myTCR = new ListCellRenderer(comboData, rowCount);
    // forces this column to use the custom Cell Renderer
    customColumn.setCellRenderer(myTCR);
    TableCellEditor myTCE = new DefaultCellEditor(new JComboBox(comboData));
    customColumn.setCellEditor(myTCE);
    // inner class for custom CellRenderer (ComboBox)
    class ListCellRenderer extends ComboBoxControl implements
    TableCellRenderer{
    public ListCellRenderer(Object cData[], int iRow)
    super();
    for (int i=0; i<iRow; i++)
    addItem(cData.toString());
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected,
    boolean hasFocus, int row, int column)
    setBackground(isSelected && hasFocus ? table.getSelectionBackground() :
    table.getBackground());
    setForeground(isSelected && hasFocus ? table.getSelectionForeground() :
    table.getForeground());
    setFont(table.getFont());
    setSelectedItem(value);
    return this;
    null

    You should pass the name of the attribute,
    not the label to the "MyGridComboBox"
    constructor.(As grid_ColumnName).
    Hope helps.

  • Getting Dates using combo boxes

    I am trying to get a start date and an end date from a combo
    box. I have the following AS3 code but it doesn't work. startDay,
    startMonth etc are all comboboxes with appropriate data. Just can't
    figure the syntax to make it work.
    var start_date = new
    Date(startYear.selectedIndex,startMonth.selectedIndex,startDay.selectedIndex);
    var end_date = new
    Date(endYear.selectedIndex,endMonth.selectedIndex,endDay.selectedIndex);
    then i want to calculate and display the total days
    var nDiffDays = Math.floor((end_date - start_date)/86400000);
    totalDays_txt = nDiffDays;
    Any help appreciated.

    There are two of those controls: the drop down list and the combo box. Try the drop down list instead.

  • Combo box in matrix column does not bind

    Dear Sirs,
    I have a master data UDO with three child tables, and I generated an xml form file using the B1DE form ganerator for this UDO.
    After that I used screen painter to set some columns of the matrix bindend to the child tables as combo box.
    In the load data event of the form I populate each combo box cell with the valid values I want.
    Now, when I add (or update) data , the combo box let me choose the valid values correctly (and I can see the choosen value in the cell) , but then data are not saved in the DB, while the data entered in edit text columns are correclty saved.
    Anyone have an idea of the problem?
    Thank you for the help
    Massimo

    Massimo,
    Have a look at the SDK Sample for Matrix and DataSource ...
    ...\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\06.MatrixAndDataSources
    This may help.
    Eddy

  • Error when populating combo box

    I tried to display my data in combo box from my access table but my combo box is empty. Here's my code:
    <% String temp="";     
         Connection conn = null;
         try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              conn = DriverManager.getConnection("jdbc:odbc:admin_management");
              Statement stmt = conn.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT Virtual_host_name FROM Server_Info");
    %>
    <select name="Server_available">
    <%
    while (rs.next()) {
    temp= rs.getString("Virtual_host_name"); %>
    <%System.out.println("<OPTION VALUE=" + temp + ">" + temp + "\n");%>
    <%}%>
    </select>
    <!-- HEADER STARTS HERE--->
    <%
         catch(SQLException e)
              //out.println("SQLException: " + e.getMessage() + "<BR>");
              while((e = e.getNextException()) != null)
              out.println(e.getMessage() + "<BR>");
         catch(ClassNotFoundException e)
              out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
         finally
              if(conn != null)
         try
              conn.close();
         catch (Exception ignored) {}
    %>
    Please help me asap. thanks!!

    Instead of "System.out.println" try using "out.println"

  • How to display data in a grid after selecting topic from combo box?

    could someone help me out? i'm displaying a combo box (about
    20 items) vertically. when user selects one of these items, i'd
    like for information regarding that choice to be displayed in my
    data grid. thanks - Karl from Kansas

    If you have the following:
    <mx:ComboBox id="combo_box" dataProvider="{users}"
    labelField="user_name" change="show_details(event)"
    ></mx:ComboBox>
    <mx:DataGrid id="data_grid" >
    <mx:columns>
    <mx:DataGridColumn headerText="Name"
    dataField="user_name"/>
    <mx:DataGridColumn headerText="email"
    dataField="email"/>
    </mx:columns>
    </mx:DataGrid>
    private function show_details(evt:Event):void {
    data_grid.dataProvider = evt.currentTarget.selectedItem
    This assumes that your combo box data has a user_name and
    email property value. Substitute your property values where needed.
    Vygo

  • Problem rendering a combo box in the data grid

    Hi,
    I am rendering a combo box in the data grid control using an
    item renderer. When I click on it to select a value from the drop
    down, the combo box immediately closes giving no time to even click
    on the dropdown. This doesn’t happen every time the combo is
    clicked, although it happens frequently. What I think is that the
    problem arises because the data grid tries to refresh the renderers
    and during this process, the existing combo is removed, thereby
    getting closed automatically. Please let me know of a work around.
    Thanks,
    Cheree

    hi hiwa,
    i have to add combo box in datagrid dynamically.
    it should append as and when i add the data in the above text boxes.
    thanks in advance.

  • 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

Maybe you are looking for