Enable / disable combo box in datagrid cell

I have a datagrid with 8 columns 2 check boxes a text box and
5 combo boxes. I am trying to disable the combo boxes if the first
check box is not checked. So far I am able to disable the entire
column with the combo box in it, but what i am trying to achieve is
if the check box is false then the 5 combo boxes are to be
disabled.
So what I am asking in a nutshell is is there a way to enable
or disable particular cells in a datagrid ?
Example
of what I have already done
Any suggestions will be gratefully received.

I put the following code in that I took from samples:
Bindable]public var test:ArrayCollection;
private  
function init():void
test =
new ArrayCollection([{label:"High", data:"high"},{label:
"Medium", data:"medium"},{label:
"Low", data:"low"}]) 
Then in the mxml:
<mx:DataGridColumn 
headerText="From Fiscal Period">
<mx:itemRenderer>
<mx:Component>
<mx:ComboBox dataProvider="{test}">
</mx:ComboBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
I still get the same error: 1120: Access of undefined property test.

Similar Messages

  • Disabled combo boxes don't display properly after loading a movie.

    Hi,
    I have a main movie that contains some combo boxes. Some of them may be disabled.
    By pressing a button I load another movie using loadMovie. The loaded movie also contains combo boxes.
    When the button is pressed, the clip that shows the combo boxes is removed from the stage and the loaded movie is displayed. By pressing another button, the loaded movie is unloaded and the clip with the combo boxes is displayed again.
    Well, once the other movie has been loaded, when I go back to the clip with combo boxes, the disabled combo boxes have a small gray button covering the black down arrow.
    I have determined that so long as the loaded movie contains combo box in the library, the problem occurrs, even if there is no actual instance of it.
    The combo boxes that are not disabled are not affected. The combo boxes are disabled by setting "cb_name.enabled=false".
    If the combo box is enabled, it displays correctly, but if disabled again, it goes wrong again.
    My project is targeting Flash 8, so it uses AS2.
    I'm using Flash CS4.
    This is a very simple example I did to make sure I wasn't doing anything funny:
    Initially:
    After pressing the button:
    After pressing the other button:
    The behaviour in a web browser is the same...
    I hope someone can help me with this. Thanks in advance!

    Thanks for the response.
    The "Load the movie" button:
    on(click)
        _parent.gotoAndStop(2);
    The 2nd frame:
    loadMovie("Test another child.swf",Container);
    stop();
    The "Unload and go back" button:
    on(click)
        unloadMovie(_parent.Container);
        _parent.gotoAndStop(1);
    Container is a movieClip with a dark gray square shape the size of the movie clip that is loaded. It doesn't exist on frame 1, only on frame 2.
    The combo boxes are inside a movie clip, and this is only on the stage on frame 1.
    This and the captures belong to a very simple test I did. If there is a way of posting files, I can post a zip file with the two .fla and the two .swf.

  • Having a combo box in a cell not to whole column

    I want to have a combo box in a cell of a table but not the whole column.Please help me in this .Its very important to our project

    Sorry , I don't want more space in cell.I want a combo box in a cell.But when i am setting the combo box it is applying to whole column and in every row i am getting a combobox .But i want to have a combo box in one row and a textfield in another row in the same column.
    Note : I am taking the input for a form in that i want a combo for background color ,font,size etc but i want a textfield for label .I think u have understood.
    thnx

  • Disable Combo Box Wrapping?

    Is it possible to disable combo box wrapping?  I would like to right-justify text in a combo box and display the right-most characters if the text is larger than the size of the combo box.  Currently, if the text is larger than the box, it appears left-justified due to wrapping.
    Thanks
    CLA, CTA

    Hi LVB,
    I see what you are running into, but unfortunately word wrapping cannot be disabled in a combo box. You'll have to find some other way to set up your UI.  Of course, you can always submit a product suggestion for this option.
    Brian A.
    National Instruments
    Applications Engineer

  • Combo box in datagrid

    Hello,
    I have combobox in my datagrid, the combo box is as follow:
            <fx:Component id="inlineEditor">
                <mx:ComboBox  >   
                    <mx:dataProvider>
                        <fx:String>MR. ONE</fx:String>
                        <fx:String>MR. TWO</fx:String>
                        <fx:String>MR. FOUR</fx:String>
                        <fx:String>MR. FIVE</fx:String>
                    </mx:dataProvider>
                </mx:ComboBox>
            </fx:Component>
    And my datagrid is;
        <mx:DataGrid id="dataGrid"  editable="true" x="167" y="119"  creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getAllResult.lastResult}">
            <mx:columns>
                <mx:DataGridColumn headerText="id" dataField="id" editable="false"/>
                <mx:DataGridColumn headerText="name" dataField="name"/>
                <mx:DataGridColumn headerText="surName" dataField="surName"
                                   itemEditor="{inlineEditor}"
                                   editorDataField="selectedItem" />
                <mx:DataGridColumn headerText="unitId" dataField="unitId"/>
                <mx:DataGridColumn headerText="datum" dataField="datum"
                                   itemRenderer="mx.controls.DateField"
                                   rendererIsEditor="true"
                                   editorDataField="selectedDate"/>
                <mx:DataGridColumn headerText="company" dataField="company"
                                   itemRenderer="mx.controls.CheckBox" 
                                   rendererIsEditor="true"
                                   editorDataField="selected"/>
            </mx:columns>
        </mx:DataGrid>
    Now this works fine with the values from the combobox. The issue here is that I need the combo box to be populated from a table/model, normaly I would use outside of the datagrid:
        <s:ComboBox x="138" y="399" id="comboBox" creationComplete="comboBox_creationCompleteHandler(event)" labelField="name">
            <s:AsyncListView list="{getAllResult2.lastResult}"/>
        </s:ComboBox>
    And this would work fine. But how to use this combobox in the datagrid. I use LCSD for DMS.
    All help is appriciated

    I put the following code in that I took from samples:
    Bindable]public var test:ArrayCollection;
    private  
    function init():void
    test =
    new ArrayCollection([{label:"High", data:"high"},{label:
    "Medium", data:"medium"},{label:
    "Low", data:"low"}]) 
    Then in the mxml:
    <mx:DataGridColumn 
    headerText="From Fiscal Period">
    <mx:itemRenderer>
    <mx:Component>
    <mx:ComboBox dataProvider="{test}">
    </mx:ComboBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    I still get the same error: 1120: Access of undefined property test.

  • Problem in event handling of combo box in JTable cell

    Hi,
    I have a combo box as an editor for a column cells in JTable. I have a event listener for this combo box. When ever I click on the JTable cell whose editor is combo box,
    I get the following exception,
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.setDispatchComponent(Unknown Source)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Can any one tell me how to over come this problem.
    Thanks,
    Raghu

    Here's an example of the model I used in my JTable. I've placed 2 comboBoxes with no problems.
    Hope this helps.
    public class FileModel5 extends AbstractTableModel
    public boolean isEditable = false;
    protected static int NUM_COLUMNS = 3;
    // initialize number of rows to start out with ...
    protected static int START_NUM_ROWS = 0;
    protected int nextEmptyRow = 0;
    protected int numRows = 0;
    static final public String file = "File";
    static final public String mailName = "Mail Id";
    static final public String postName = "Post Office Id";
    static final public String columnNames[] = {"File", "Mail Id", "Post Office Id"};
    // List of data
    protected Vector data = null;
    public FileModel5()
    data = new Vector();
    public boolean isCellEditable(int rowIndex, int columnIndex)
    // The 2nd & 3rd column or Value field is editable
    if(isEditable)
    if(columnIndex > 0)
    return true;
    return false;
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    * Retrieves number of columns
    public synchronized int getColumnCount()
    return NUM_COLUMNS;
    * Get a column name
    public String getColumnName(int col)
    return columnNames[col];
    * Retrieves number of records
    public synchronized int getRowCount()
    if (numRows < START_NUM_ROWS)
    return START_NUM_ROWS;
    else
    return numRows;
    * Returns cell information of a record at location row,column
    public synchronized Object getValueAt(int row, int column)
    try
    FileRecord5 p = (FileRecord5)data.elementAt(row);
    switch (column)
    case 0:
    return (String)p.file;
    case 1:
    return (String)p.mailName;
    case 2:
    return (String)p.postName;
    catch (Exception e)
    return "";
    public void setValueAt(Object aValue, int row, int column)
    FileRecord5 arow = (FileRecord5)data.elementAt(row);
    arow.setElementAt((String)aValue, column);
    fireTableCellUpdated(row, column);
    * Returns information of an entire record at location row
    public synchronized FileRecord5 getRecordAt(int row) throws Exception
    try
    return (FileRecord5)data.elementAt(row);
    catch (Exception e)
    throw new Exception("Record not found");
    * Used to add or update a record
    * @param tableRecord
    public synchronized void updateRecord(FileRecord5 tableRecord)
    String file = tableRecord.file;
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    boolean addedRow = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    { //update
    data.setElementAt(tableRecord, index);
    else
    if (numRows <= nextEmptyRow)
    //add a row
    numRows++;
    addedRow = true;
    index = nextEmptyRow;
    data.addElement(tableRecord);
    //Notify listeners that the data changed.
    if (addedRow)
    nextEmptyRow++;
    fireTableRowsInserted(index, index);
    else
    fireTableRowsUpdated(index, index);
    * Used to delete a record
    public synchronized void deleteRecord(String file)
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    data.removeElementAt(i);
    nextEmptyRow--;
    numRows--;
    fireTableRowsDeleted(START_NUM_ROWS, numRows);
    * Clears all records
    public synchronized void clear()
    int oldNumRows = numRows;
    numRows = START_NUM_ROWS;
    data.removeAllElements();
    nextEmptyRow = 0;
    if (oldNumRows > START_NUM_ROWS)
    fireTableRowsDeleted(START_NUM_ROWS, oldNumRows - 1);
    fireTableRowsUpdated(0, START_NUM_ROWS - 1);
    * Loads the values into the combo box within the table for mail id
    public void setUpMailColumn(JTable mapTable, ArrayList mailList)
    TableColumn col = mapTable.getColumnModel().getColumn(1);
    javax.swing.JComboBox comboMail = new javax.swing.JComboBox();
    int s = mailList.size();
    for(int i=0; i<s; i++)
    comboMail.addItem(mailList.get(i));
    col.setCellEditor(new DefaultCellEditor(comboMail));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for mail Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Mail Id to see a list of choices");
    * Loads the values into the combo box within the table for post office id
    public void setUpPostColumn(JTable mapTable, ArrayList postList)
    TableColumn col = mapTable.getColumnModel().getColumn(2);
    javax.swing.JComboBox combo = new javax.swing.JComboBox();
    int s = postList.size();
    for(int i=0; i<s; i++)
    combo.addItem(postList.get(i));
    col.setCellEditor(new DefaultCellEditor(combo));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for post office Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Post Office Id to see a list of choices");
    }

  • Enable disable linkbar links in datagrid itemrenderer.

    Hi All,
    I have to show the linkbar in datagrid column as a renderer and enable and disable the links according to attached documents codes.
    here are my sample code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();">
    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            [Bindable]
              public var arrColl:ArrayCollection = new ArrayCollection();
              public function init():void{
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
                  arrColl.addItem(["1,2,3","1,2"]);
                  arrColl.addItem(["1,2,3", "1,3"]);
        ]]>
    </mx:Script>
        <mx:DataGrid id="dg" dataProvider="{arrColl}" width="200" height="500" x="510" y="168" >
            <mx:columns>
                <mx:DataGridColumn  itemRenderer="assets.components.linkbarItemRenderer"  />   
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    My item renderer linkbarItemRenderer.mxml as
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" creationComplete="init();" >
    <mx:Script>
        <![CDATA[
            import mx.controls.LinkButton;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            [Bindable] public var arrColl : ArrayCollection = new ArrayCollection();
            public var arrDocType : ArrayCollection = new ArrayCollection([{data:"1" , label:"AP"},{data:"2" , label:"AR"},{data:"3" , label:"BOL"}]);
            public var attDoccodes : Array;
            public function init():void
                try
                    var requiredDoc :String = data[0];
                    var attachDoc : String = data[1];
                    var reqDocCodes :Array =  requiredDoc.split(",");
                    attDoccodes = attachDoc.split(",");
                    if(reqDocCodes != null)
                        //add the links of required documents.
                        for(var i:int = 0 ; i<reqDocCodes.length; i++ )
                            var obj:Object = new Object();
                            for(var j : int = 0; j < arrDocType.length; j++)
                                if(arrDocType.getItemAt(j).data == reqDocCodes[i])
                                    obj.label = arrDocType.getItemAt(j).label;
                                    obj.data  = reqDocCodes[i];
                            arrColl.addItem(obj);
                    callLater(enableDisalbeLinks);
                catch(error:Error)
                    Alert.show("error ::"+error.getStackTrace());
            public function enableDisalbeLinks():void
                try
                    //disable all links first
                    for(var q:int=0; q< arrColl.length; q++)
                        LinkButton(linkBarId.getChildAt(q)).enabled = false;   
                    if(attDoccodes != null)
                        for(var k:int = 0; k<attDoccodes.length; k++)
                            for(var l:int = 0 ; l<arrColl.length; l++)
                                if(arrColl.getItemAt(l).data == attDoccodes[k])
                                    LinkButton(linkBarId.getChildAt(l)).enabled = true;   
                catch(error:Error)
                    Alert.show("error ::"+error.getStackTrace());
        ]]>
    </mx:Script>
            <mx:LinkBar id="linkBarId" dataProvider="{arrColl}" />   
    </mx:HBox>
    It renderes the link in correct form in datagrid first time.when i scroll the datagrid the rows are miss up with each other and links are not shown propers in enable/disable format.
    Thanks,
    Amol.

    Hi All,
    It was my fault. Got it work now.
    When I redirect to PR, it also calls my page initialization method and clear all data. I added a parameter and issue resolved.
    Thanks & Regards,
    KJ

  • Combo Box inside dataGrid

    I have looked everywhere and I am having a hard time finding
    a good example of how to use a combo box in a datagrid. I want to
    use a dataprovider for my datagird but as soon as I get inside my
    itemRenderer it throws an error saying Access of undefined property
    model even though it is defined above. Can someone please help me.
    I may be way off??
    <mx:DataGrid x="10" y="10" width="840" height="120"
    dataProvider="{model.acProducts}">
    <mx:columns>
    <mx:DataGridColumn dataField="UPC Number">
    <mx:itemRenderer>
    <mx:Component>
    <mx:ComboBox
    dataProvider="{model.acProducts}"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn dataField="proddesc"
    headerText="Product Name" />
    <mx:DataGridColumn headerText="Lot Number" />
    <mx:DataGridColumn headerText="Product Category" />
    <mx:DataGridColumn headerText="EPA" />
    <mx:DataGridColumn headerText="AE Count">
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox horizontalAlign="center">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var selected:Boolean;
    ]]>
    </mx:Script>
    <mx:CheckBox id="displayCheckBox" click="selected =
    displayCheckBox.selected"/>
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>

    i got it. Heres the code for everyone who is wondering
    <mx:DataGrid x="10" y="10" width="840" height="120"
    dataProvider="{model.acProducts}" ro>
    <mx:columns>
    <mx:DataGridColumn dataField="UPC Number">
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox>
    <mx:Script>
    <![CDATA[
    import
    com.serg.reportingTool.model.SergReportingToolModelLocator;
    [Bindable] private var model:SergReportingToolModelLocator =
    SergReportingToolModelLocator.getInstance();
    ]]>
    </mx:Script>
    <mx:ComboBox
    id="occurenceCode"
    labelField="OccurrenceCode"
    dataProvider="{model.acOccurrences}"
    />
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn dataField="proddesc"
    headerText="Product Name" />
    <mx:DataGridColumn headerText="Lot Number" />
    <mx:DataGridColumn headerText="Product Category" />
    <mx:DataGridColumn headerText="EPA" />
    <mx:DataGridColumn headerText="AE Count">
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox horizontalAlign="center">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var selected:Boolean;
    ]]>
    </mx:Script>
    <mx:CheckBox id="displayCheckBox" click="selected =
    displayCheckBox.selected"/>
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>

  • Disable combo box

    quick question does anyone know how to disable a combo box?thanks

    This help you to disable combo bos in Internet Explorer, but in other browser don't work. To other browser I used the onGotFocus or onFocus event (I don't remember the name exsactly). When the combo recived the focus in give the focus to another object.
    I hpe that will be helpful for you.
    Regards.
    Alejandro

  • Programatically enable-disable check box"play user interface sound effects"

    Hello All,
    I have been Working on something where i need to disable the "play user interface sound effects" check box ( Under System preferences under sound panel ) for few seconds and then enable the same programically without any user interface appearing on the screen. I know something related using the Applescript however there is a user interface appearing there which doesn't serve the purpose please help with some solution.If you could provide the exact location of the plist file which holds this information then that could help as well.

    Hi !
    I too have been working with the sounds ( Which i think is relates to @mit's query ) in an application and the problem is that when ever that application moves something to trash there is a sound which comes the sound of "throwing things in the trash". This is very annoying and i want to do something so that I can suppress that sound atleast for the time this application is on. Now is there some way where I can do this Programically . It would even be fine if I could turn off the user interface sounds completely for sometime and then bring them back on.
    Thanks In Advance !
    Looking Forward To Some response soon !
    iMAC G4   Mac OS X (10.4)   Power PC 256 MB RAM

  • How to enable/disable check boxes in a table.

    hi Gurus,
    i am new to webdynpro for abap.
    the problem i have is.
    i have a table with two columns. first one is a check box column and the second one is a value field. the table is populated with data(second field only) upon pressing some button.
    while populating data i want to make check box field/row ticked and disabled when second field row value is 'X' . if not leave the check box row/field enabled and unticked ( if i want i can tick the check box later). hope you guys me. this is sort of urgent. please reply with some code.
    thanks in advance.
    Sree

    Hi
    Issue what i am facing is,i want to display column of CHECKBOXes in my ALV.
    for that i declare atrribute of type CHECKBOX.
    And i write the following code.
    lr_column_settings ?= l_value.
    lt_columns = lr_column_settings->get_columns( ).
    loop over table - in each loop another column can be modified
    LOOP AT lt_columns INTO ls_column.
    IF ls_column-id = 'CHK_BOX'.
    CREATE OBJECT lr_chk_box
    EXPORTING
    checked_fieldname = ls_column-id.
    lr_chk_box->set_read_only( ABAP_FALSE ).
    lr_chk_box->set_read_only_fieldname( 'ALV_FINAL_STATUS' ).
    ls_column-r_column->set_cell_editor( lr_chk_box ).
    even i cant able to get checkbox in my ALV.
    IT is displaying as general field.
    Regards,
    Ravi

  • Add a Drop down menu / Combo Box into a specified cell of a multi column lsit box

    Hello,
    i have a question how to manipulate a cell of a multi column list box in that way that i can add a drop down menu or a combo box in this cell?
    Is this possible in LabView?
    Thank you!

    Wow, I took a look at the alternate code posted here at that really takes you through gyration (also a similiar comment I see on Lava) to perform what I've done with a few functions....
    See the Pics and attached VI for how its done. KISS, I added an event stucture and changed my first enum case to " " (i.e. a blank) to make it look like the other posted code....
    Attachments:
    DropDownMenuInABox.vi ‏18 KB
    DropDownMenuInABox_FP.PNG ‏18 KB
    DropDownMenuInABox_BD.PNG ‏36 KB

  • Cmfctoolbarcomboboxbutton, how to enable/disable

    Hi,
    I inserted a CMFCToolBarComboBoxButton object in my toolbar. all work fine except enabling and disabling ComboBox according state of my App.
    I used EnableWindow but the control still actived.
    Any idea?
    Tanks.
    My creation code :
    if (wParam == IDR_MAINFRAME24) {
    m_ComboButton = new CMFCToolBarComboBoxButton(ID_MONTH_FILTER, GetCmdMgr()->GetCmdImage(ID_MONTH, FALSE),
    CBS_DROPDOWNLIST);
    CString strMonths, strMonth;
    int i, curPos = 0;
    if (strMonths.LoadStringW(IDS_MONTHS)) {
    i = 1;
    //m_ComboButton->AddItem(_T(""), 0);
    strMonth = strMonths.Tokenize(_T(";"), curPos);
    while (strMonth != _T("")) {
    m_ComboButton->AddItem(strMonth, i);
    strMonth = strMonths.Tokenize(_T(";"), curPos);
    i++;
    m_wndToolBar.ReplaceButton(ID_MONTH, *m_ComboButton);
    CMFCToolBarComboBoxButton * pMonthCombo = CMFCToolBarComboBoxButton::GetByCmd(ID_MONTH_FILTER, FALSE);
    if (pMonthCombo) {
    pMonthCombo->SetCenterVert(false);
    pMonthCombo->SetText(_T("Advanced filter"));
    pMonthCombo->EnableWindow(FALSE);

    Tank you for your help.
    you are right, but a update cammand ui message is not send by CMFCToolBarComboBoxButton object.
    I make a test on my side and mesajflaviu's suggestion really helpful. Using ON_UPDATE_COMMAND_UI macro, I can disable the CMFCToolBarComboBoxButton in the CMFCToolBar. See my test code snippet:
    BOOL m_enable; //use to detect if enable the combo box
    afx_msg void OnUpdateCombo(CCmdUI *pCmdUI);
    ON_UPDATE_COMMAND_UI(IDR_COM, &CMainFrame::OnUpdateCombo)
    void CMainFrame::OnUpdateCombo(CCmdUI *pCmdUI)
    pCmdUI->Enable(m_enable);
    void CMainFrame::OnEditDisable()
    // TODO: Add your command handler code here
    m_enable = FALSE;// use a menuitem to disable the combo box
    ///////create the CMFCToolBarComboBoxButton//////////
    LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM lp)
    UINT uiToolBarId = (UINT)wp;
    TRACE("CMainFrame::OnToolbarReset : %i\n", uiToolBarId);
    switch (uiToolBarId)
    case IDR_TOOLBAR1:
    m_ComboButton = new CMFCToolBarComboBoxButton(IDR_COM, GetCmdMgr()->GetCmdImage(IDR_COM, FALSE), CBS_DROPDOWNLIST);
    m_ComboButton->EnableWindow(true);
    m_ComboButton->SetCenterVert();
    m_ComboButton->SetDropDownHeight(25);
    m_ComboButton->SetFlatMode();
    m_ComboButton->AddItem(_T("OPTION1"));
    m_ComboButton->AddItem(_T("OPTION2"));
    m_ComboButton->SelectItem(0);
    m_wndToolBar.ReplaceButton(IDR_COM, *m_ComboButton);
    break;
    return 0;
    Check the result screenshot:
    Enable:
    Disable: Color is turning yellow and cannot click
    Best regards,
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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.

  • Tab Component Dynamic Visibility to Combo Boxes

    I am using a Tab component.  I have 3 tabs on my dashboard.  I have 2 Combo boxes that I am using to filter rows of data on 3 Excel sheets.  Both Combo boxes are not used on all the tabs.  How can I pass example: User clicks on Tab 1 and use dynamic visibility for Combo Box 1 and Combo Box 2 are visible.  If the user clicks on Tab 2 I want only Combo Box 1 to be visible.

    Hi Joe,
    This can be achieved in Dynamic visibility.
    On click on Tab,just map to some target(say value "1") and then For Combo box,set target cell mapped for tab to 1,which means when the target cell gets "1",show the Combo box.
    If you are not clear then you can refer the following URL,which will give you more informations about this.
    http://everythingxcelsius.com/2008/08/tip-7-xcelsius-dynamic-visibility-video-tutorial.html
    Rgds,
    Murali

Maybe you are looking for

  • Photoshop CC hangs when I open or create a file

    This is the error report: Date/Time:       2014-04-08 18:08:41 -0500 OS Version:      10.9.2 (Build 13C64) Architecture:    x86_64 Report Version:  18 Command:         Photoshop Path:            /Applications/Adobe Photoshop CC/Adobe Photoshop CC.app

  • Problem mapping LoginModule roles to ejb security roles

    I have "successfully" managed to implement the DBSystemLoginModule. When I run my application I successfully authenticate to the database, the login module successfully retrieves the users roles from the database and adds them to the subject: Passive

  • Monitor expansion question.

    hey there. im not new to mac just new to owning a powermac G5. mine is the early 2005 edition. dual 2.0 model. i want to connect 2 NON apple displays to it but i notice there is 1 slot for DVI and one for apple displays. how would i go about adding a

  • Executing sqlplus / sqlldr command from java code

    hi, I have my application on one server(tomcat) and oracle server is installed on other server. i.e. Both are on different machine. Now i want to run sqlplus / sqlldr command on oracle server from my java code. Again my script for lodder command is i

  • Time Machine and Accessing iPhoto library on an external HD

    Hi I am new to Time Machine.  I didn't see a community for it, so I am posting here. I have TIme Machine set to backup to an external HD (Clickfree).  When I check on the iphoto library stored on the HD for the TIme Machine, I am unable to open the l