Dynamic Combo In Grid

Is is possible to change the Values of a combobox based on a value in another field on that row on the grid.
For example if field 1 = true then validvalues of the CB are 1,2,3
if it is False  then the valid values are 4,5,6
I have tried the ItemPressed but the combo opens before that event (yes I am using the Befor event)

william you would need to remove the existing and add new values.
but this is problematic. I would suggest using a formatted search.

Similar Messages

  • Needs multi column dynamic combo box using C#

    I need a dynamic Combo box to display multi columns on Drop Down Event 
    such as Stock Code, Make, Model,Sub Model, Measurement Type and so on for  my C# Application with Columns Headers 
    Please Help Me
    Thanks in Advance

    You should create a class that represents your model and then you could use a CompositeCollection as the ItemsSource of the ComboBox.
    Here is an example for you:
    namespace WpfApplication59
    public class YourModel
    public string StockCode { get; set; }
    public string Model { get; set; }
    //+ the rest of your properties
    MainWindow.xaml.cs:
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    List<YourModel> models = new List<YourModel>();
    models.Add(new YourModel() { Model = "m1", StockCode ="c1"});
    models.Add(new YourModel() { Model = "m2", StockCode = "c2" });
    cb.ItemsSource = models;
    MainWindow.xaml:
    <ComboBox x:Name="cb" Grid.IsSharedSizeScope="True" ItemsSource="{DynamicResource items}"
    xmlns:local="clr-namespace:WpfApplication59">
    <ComboBox.Resources>
    <CompositeCollection x:Key="items">
    <ComboBoxItem IsEnabled="False">
    <Grid TextElement.FontWeight="Bold">
    <Grid.ColumnDefinitions>
    <ColumnDefinition SharedSizeGroup="A"/>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition SharedSizeGroup="B"/>
    </Grid.ColumnDefinitions>
    <Grid.Children>
    <TextBlock Grid.Column="0" Text="Model"/>
    <TextBlock Grid.Column="2" Text="Stock Code"/>
    </Grid.Children>
    </Grid>
    </ComboBoxItem>
    <Separator/>
    <CollectionContainer Collection="{Binding Source={x:Reference cb}, Path=DataContext}"/>
    </CompositeCollection>
    <DataTemplate DataType="{x:Type local:YourModel}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition SharedSizeGroup="A"/>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition SharedSizeGroup="B"/>
    </Grid.ColumnDefinitions>
    <Grid.Children>
    <TextBlock Grid.Column="0" Text="{Binding Model}"/>
    <TextBlock Grid.Column="2" Text="{Binding StockCode}"/>
    </Grid.Children>
    </Grid>
    </DataTemplate>
    </ComboBox.Resources>
    </ComboBox>
    You could restyle the the templates (Grids) as per your requirements.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • Need to display COlumn headers dynamically in ALG Grid

    Hello,
    I need to display column headers dynamically in alv grid Display with its corresponding value.
    Column headers should be picked from a field in Final Internal table and its corresponding field will also need to pick from the same table.
    T_final... Suppose Field STCTS - (To pick coulmn headers)
                                      CCNGN - (To pick appropriate value for that column)
    Can anybody explain me how i can pass these values to ALV Grid using
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
      EXPORTING
        IT_FIELDCATALOG           = Y_I_FCAT
      IMPORTING
        EP_TABLE                  = DY_TABLE.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Any suggestions will be appreciated....
    Regards,
    Kittu

    Hi,
    Go thru this link, and the code of Mr.Dev Parbutteea
    Re: Probelm with Using Field Symbol in FM
    thanks
    Mahesh

  • A BUG? - dynamic combo problem

    Hello!Setting dynamic option in the combo, where the essbase shared members are selected causes a problem.There is no way to open the report containing such combo - an "error occured while loading report" message apears. Does anyone experienced such error? Are there any ideas how to use dynamic combos and shared members?thanks

    Of course this issue concerns Analyzer 6.1

  • How to download only some fields(dynamically) from alv grid layouts

    I have ALV grid list.
    I have layouts for selecting sets of fields dynamically.
    If I select a particular layout, I want to download only those fields into an Excel sheet.
    If I select another layout, I want to download only fields of that layout , into an Excel sheet.
    Can u plz write examples.
    Narendra

    Hello ,
    Here it is.
      FIELD-SYMBOLS <FS> TYPE ANY.
      DATA: GR_ATTACHMENT TYPE Z48S3_ATTACHMENT,
            GT_ATTACHMENT TYPE Z48S3_ATTACHMENT_TAB,
            L_F_TITLE     TYPE SO_OBJ_DES,
            L_R_FIELDCAT  LIKE LINE OF GT_FIELDCAT,
            L_F_FIELD     LIKE L_R_FIELDCAT-FIELDNAME,
            L_F_EMAILID   TYPE Z48S3_RECEIVER,
            L_F_FIRST     TYPE C.
      IF SY-SYSID EQ G_C_DEV_SYSTEM OR
         SY-SYSID EQ G_C_QUA_SYSTEM.
        CONCATENATE SY-SYSID '/' SY-MANDT ':' INTO L_F_TITLE.
        CONDENSE L_F_TITLE.
        CONCATENATE L_F_TITLE SY-TITLE INTO L_F_TITLE SEPARATED BY SPACE.
      ELSE.
        L_F_TITLE = SY-TITLE.
      ENDIF.
      G_R_VARIANT-REPORT = SY-REPID.
      G_R_VARIANT-VARIANT = P_VARIAN.
      CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
           EXPORTING
                I_DIALOG            = 'N'
                I_USER_SPECIFIC     = 'A'
                I_DEFAULT           = 'X'
                IT_DEFAULT_FIELDCAT = G_T_FIELDCAT
                I_LAYOUT            = GR_LAYOUT
           IMPORTING
                ET_FIELDCAT         = G_T_FIELDCAT
                ES_LAYOUT           = GR_LAYOUT
           CHANGING
                CS_VARIANT          = G_R_VARIANT
           EXCEPTIONS
                ERROR_MESSAGE       = 4
                OTHERS              = 4.
      SORT G_T_FIELDCAT BY COL_POS.
      PERFORM CREATE_EXCEL_ATTM_HEADING_ROW TABLES GT_ATTACHMENT
                                                   G_T_FIELDCAT.
      LOOP AT G_T_ALVLIST.
        L_F_FIRST = 'X'.
        LOOP AT G_T_FIELDCAT INTO L_R_FIELDCAT WHERE NO_OUT IS INITIAL.
          CLEAR GR_ATTACHMENT-XNEWLINE.
          IF NOT L_F_FIRST IS INITIAL.
            GR_ATTACHMENT-XNEWLINE = 'X'.
            CLEAR L_F_FIRST.
          ENDIF.
          CLEAR L_F_FIELD.
          CONCATENATE 'G_T_ALVLIST-' L_R_FIELDCAT-FIELDNAME
                 INTO L_F_FIELD.
          CONDENSE L_F_FIELD.
          ASSIGN (L_F_FIELD) TO <FS>.
          WRITE <FS> TO GR_ATTACHMENT-FIELDVALUE.
          UNASSIGN <FS>.
          APPEND GR_ATTACHMENT TO GT_ATTACHMENT.
        ENDLOOP.
      ENDLOOP.
    Regards,
    Vasanth

  • Change the total and subtotal dynamically in ALV GRID

    Hi guys,
               I need to change the total and subtotal of field "AMOUNT" dynamically.I am using ALV GRID CONTROL(oops concept).I need to override the standard functionality.I need to show my own subtotal and total line instead of standard one .

    Hi
    I've understood it, I wanted to use OO Grid too, but I had to use the ALV list in order to write my total.
    If you need to use OO grid u can try to exclude all funcitonalities for the total, subtotal and sorting and insert in the output table the lines with your totals.
    Max

  • How can I dynamically change a Grids ro color

    Hi,
    I am using a grid within a component in my Flex application.
    I have an XML dataProvider, and I want to change the row
    colour of my Grid depending on a value coming form my dataProvider
    – but I cant seem to get this to work :(
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    For example:
    Within my component I have the following grid within an
    “MXML” component called myGrid.mxml:
    [CODE]<mx:Grid id="GGrid">
    <mx:GridRow backgroundColor="0xCFD8DA">
    <mx:GridItem>
    <mx:Label id=”name_lbl”/>
    </mx:GridItem>
    </mx:GridRow>
    <mx:GridRow backgroundColor="0xCFD8DA">
    <mx:GridItem>
    <mx:Label id=”expiryDate_lbl”/>
    </mx:GridItem>
    </mx:GridRow>
    <mx:GridRow id=”statusRow”>
    <mx:GridItem>
    <mx:Label id=”status_lbl”/>
    </mx:GridItem>
    </mx:GridRow>
    </mx:Grid>[/CODE]
    I am setting/declaring my results/variables form my
    dataProvider in the main Application (“MXML”) file:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    creationComplete="initApp()" >
    <mx:HTTPService
    id="myResults"
    url="
    http://localhost/myResults.xml"
    resultFormat="e4x"
    result="myResultHandler(event)" />
    [CODE]<mx:Script>
    <![CDATA[
    import mx.core.Application;
    [Bindable]
    public var myDataFeed:XML;
    public function initApp():void
    myResults.send();
    public function myResultHandler(event:ResultEvent):void
    myDataFeed = event.result as XML;
    Application.application.myGrid.name_lbl.text =
    myDataFeed.name;
    Application.application.myGrid.expiryDate_lbl =
    myDataFeed.expiry;
    Application.application.myGrid.status_lbl.text =
    myDataFeed.status;
    if(myDataFeed.status == “OK”)
    Application.application.statusRow.backgroundColor="0xCFD8DA";
    else if (myDataFeed.status == “WARNING”)
    Application.application.statusRow.backgroundColor="0xFF9900";
    else if (myDataFeed.status == “CRITICAL”)
    Application.application.statusRow.backgroundColor="0xFF0000";
    ]]>
    </mx:Script>
    </mx:Application>[/CODE]
    however, I cannot access the property
    “backgroundColor” of the gridRow in this way:
    [CODE]Application.application.statusRow.backgroundColor[/CODE]
    As I get the following error:
    [CODE]Severity and Description Path Resource Location
    Creation Time
    Id 1119:
    Access of possibly undefined property backgroundColor through
    a reference with static type mx.containers:GridRow.
    enterpriseDB_new enterpriseDB_new.mxml
    line 721 1194443056449 19295[/CODE]
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    Thanks,
    Jon.

    quote:
    Originally posted by:
    ljonny18
    Hi,
    I am using a grid within a component in my Flex application.
    I have an XML dataProvider, and I want to change the row
    colour of my Grid depending on a value coming form my dataProvider
    – but I cant seem to get this to work :(
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    Thanks,
    Jon.
    Hi,
    a few hours ago I stumbled across this cookbook entry - it
    didn't solve MY problem, but maybe it provides a way to solve your
    problem?
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&product Id=2&loc=en_US
    From the article:
    quote:
    Changing the background color of a DataGrid cell is not as
    simple as changing some style because the default renderer for a
    DataGrid cell does not have a backgroundColor. Therefore, to do
    this simple task, you have to create a custom itemRenderer where
    you draw your own background in the updateDisplayList function.
    HTH
    Uwe

  • Combo in Grid

    Hi Dear;
    how can I fill data in a combo(as gridcolumn) in a grid?
    thank you Dear;

    Hi
    i am not sure why you are getting error
    your Code is absolutely fine
    But try the same thing like this
    oQuery = "select DocNum, slpcode, CardName,docentry from OINV where docstatus='O' order by docnum"
    oForm.DataSources.DataTables.Item(0).ExecuteQuery(oQuery)
    oGrid.DataTable = oForm.DataSources.DataTables.Item("TB_OSLP")
    ' Set columns size
    oGrid.Columns.Item(0).Width = 50
    oGrid.Columns.Item(0).Editable = False
    oGrid.Columns.Item(1).Type = SAPbouiCOM.BoGridColumnType.gct_ComboBox
    oGrid.Columns.Item(1).Width = 150
    oGrid.Columns.Item(2).Width = 400
    oGrid.Columns.Item(2).Editable = False
    oGrid.Columns.Item(3).Visible = False
    Regards
    Vishnu
    Regards
    Vishnu

  • Dynamic Combo Boxes

    Hi,
    I have an interface that has 2 combo boxes; in the first you select a product, in the second a type of that product. Now how is possible to make a dynamic changing content combobox?
    Thanks

    Replace the model of the second box with a new one. i.e. When a selection is made in the first box, use 'box.setModel(...)' and replace the current model with a new one.
    ICE

  • Dynamic Checkbox in Grid..........

    Hi,
    i have 2 grid controls(grid1 & grid2). Grid2 values are displaying based on the selected values from grid1.Im getting the dynamic values in grid2.
    now i have to dynamicaly inculde a checkbox in grid2 .so that user can select any one from the grid2 values. how to inculde a dynamice checkbox in a grid?
    null

    Nainar,
    I did this class for active CheckBox in Grid using Brian's note. the CheckBox will attached to Grid and link to database.The only problem is when I clicked on
    CheckBox to change the value, got this error:
    JBO-27010: Attribute set with value true for Saturday in Terminal has invalid precision/scale
    Note:Saturday is a column of Terminal table.
    should be something regarding DataType
    import javax.swing.*;
    import java.awt.*;
    import oracle.dacf.control.swing.*;
    import javax.swing.table.*;
    // this class will customize a cell in GridControl as CheckBox(Dynamic)
    // To instantiate this class, add the following step in your applet
    // 0- add this class to your package.
    // 1- Get a reference to your GridControl, same as below:
    // JTable myTable = gridControl1.getTable();
    // 2- instantiate an object from this class. same as below
    // new myGridCheckBox(myTable,"SundayOpen");
    public class myGridCheckBox extends Object {
    public myGridCheckBox(JTable m_Table, String m_colName ) {
    CheckBoxControl checkBx = new CheckBoxControl();
    // get reference to a column
    TableColumn ActiveColumn = m_Table.getColumn(m_colName);
    // custom TableCellRenderer
    TableCellRenderer myTCR = new CheckCellRenderer();
    // forces this column to use the custom Cell Renderer
    ActiveColumn.setCellRenderer(myTCR);
    TableCellEditor myTCE = new DefaultCellEditor(checkBx);
    ActiveColumn.setCellEditor(myTCE);
    // inner class for custom CellRenderer (CheckBox)
    class CheckCellRenderer extends CheckBoxControl implements TableCellRenderer{
    public CheckCellRenderer()
    super();
    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());
    setSelectionValue("Y");
    setDeselectionValue("N");
    setValue(value);
    return this;
    would appreciate to let me know if you solved the problem.
    Thanks
    Ali
    null

  • Dispalying Dynamic Colors in grid

    Hi
    I have saved color codes in database...
    Now in form I want to display these stored colors in tabular form......
    In "SET_ITEM_INSTANCE_PROPERTY" I can't use "FOREGROUnD_COLOR"
    AND "BACKGROUND_COLOR". So I've to use VISUAL_ATTRIBUTE
    and SET_VA_ATTRIBUTE to change the properties of VA
    But for next record of grid property of Visual attribute changes, changing the color of previous record...
    How to solve this problem ???

    Hello,
    This PL/SQL tool is useful to set colors of standard Forms elements like canvas, current record, items of a whole Forms application, but not to colorize a special element in a special circumstance.
    To achieve your requirement, you have to use the Set_Item_Instance_Property() with a different Visual Attribute on every item of your block.
    Francois

  • Dynamically generating input grid

    I am trying to figure out a way to let users dynamically generate rows of input text boxes using a button in an HTML page e.g. user will enter text in say 10 columns and then hit enter, which will create another row of text boxes with same number of columns. Also all the text boxes should automatically generate their names e.g. if the column name is "Address" then the name of the first address text box in the first row should be e.g. "address_1" and then name of the second address text box should be e.g. "address_2".
    I want to do this on the client side, so that I can gather all the information and then only pass it on to the server.
    Any help would be greatly appreciated.
    Thx

    Depends on how you have build your JSP page. Assuming:
    1. You have built your .JSP with one or more .java files. Then the previous example that our friend answered you is write but converted into java code and not in javascript. In case you dont understand how you can build a JSP file with .java file i explain:
    you write Java code in a .java file but it has HTML tags. When your code is executed the tags are "created" because your code says so. And this is the way your .JSP is being built. In there you can create a sequence with for or anything else you figure out to build more and more lines. For the names figure out a generator method.
    2. You have built your code with another tool (Dreamweaver) and you dont want or know to use java code to create more lines. Then i suggest you a middle way:
    Figure out how many lines will be created from your users more or less. Let's say that more or less users create from 4-6 lines. Create your lines already, put names on them with a generator but have them disabled (type="textfield" ....... disabled>). Then use javascript so when the user wants to have more lines or rows allow with javascript the second row to be enabled and so on. When you reach your final line or row but the user still wants more lines, have a button saying "More" or sth like that and reload the page but be sure to store the previous entered values. I hope i helped.
    P.S. Maybe also try to change that by putting a textarea unless it doesnt help. Let me know what you think.

  • Dynamic Advanced Data Grid

    Hello,
    I am having problems to populate my advanced datagrid. Though
    the grid is getting headers, it is not getting the data from my
    datasource (Please note that I am using a cfc functions called
    "getOrds" to retrieve the data.
    Am I missing something in the code??
    It would be great if someone could help me out with this one.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical">
    <mx:Script>
    <![CDATA[
    import mx.collections.IHierarchicalCollectionView;
    [Bindable]
    [Bindable]
    public var ords:ArrayCollection = new ArrayCollection;
    public function getOrds(event:ResultEvent):void
    ords = event.result as ArrayCollection;
    ]]>
    </mx:Script>
    <mx:AdvancedDataGrid id="adg" x="28" y="64" width="609"
    height="228" creationComplete="gc2.refresh();"
    initialize="gc2.refresh();" designViewDataType="tree"
    defaultLeafIcon="{null}" folderClosedIcon="{null}"
    folderOpenIcon="{null}" >
    <mx:dataProvider>
    <mx:GroupingCollection id="gc2" source="{ords}" >
    <mx:Grouping>
    <mx:GroupingField name="rule_no" >
    <mx:summaries>
    <mx:SummaryRow summaryPlacement="group">
    <mx:fields>
    <mx:SummaryField dataField="rule_no" operation="SUM"
    />
    </mx:fields>
    </mx:SummaryRow>
    </mx:summaries>
    </mx:GroupingField>
    <mx:GroupingField name="cakes">
    <mx:summaries>
    <mx:SummaryRow summaryPlacement="group" >
    <mx:fields>
    <mx:SummaryField dataField="cakes" operation="COUNT"
    />
    </mx:fields>
    </mx:SummaryRow>
    </mx:summaries>
    </mx:GroupingField>
    </mx:Grouping>
    </mx:GroupingCollection>
    </mx:dataProvider>
    <mx:groupedColumns>
    <mx:AdvancedDataGridColumn headerText="rule_no" />
    <mx:AdvancedDataGridColumn headerText="Cakes"
    dataField="cakes"/>
    </mx:groupedColumns>
    </mx:AdvancedDataGrid>
    <mx:RemoteObject id="myService" destination="ColdFusion"
    source="components.AdvancedDG" showBusyCursor="true"
    fault="Alert.show(event.fault.message,'Error')">
    <mx:method name="getOrds" result="getOrs(event)"/>
    </mx:RemoteObject>
    </mx:Application>

    Can you give us a quick code sample where we can reproduce
    this issue?
    Thanks,
    Swaroop

  • How to add the data dynamically in data grid

    Hi,
    I got a stuck up in using JSF as I am trying to retrieve a value of a text box on clicking a button in the datagrid.
    Please suggest me a solution for his

    Please consider filing bugs in Jira at [http://javafx-jira.kenai.com|http://javafx-jira.kenai.com/]. Without your bugs being filed there is no guarantee we'll know to fix them! File them against 'runtime', for the 'control' component, and they'll turn up in my inbox.
    Thanks,
    Jonathan

  • Which is better? single jsp or inc or diff jsp

    hi,
    I have 3 modes as a combo in the top of my form say new, enquiry and amend. If the user selects, new, a new screen should appear.The user can enter values and submit, so that it can be updated into the databse.
    If the user selects Enquiry, getting some key fields from the user, the form should get submitted and display the result in the screen fields taking from the database.If it is amend, the user can do select and change and update the database..
    In this scenaio, which one is advisable? having three different Jsps or having three different includes or working with single jsp(with bean).currently iam working with single jsp(code comes around 4000 lines + bean code comes around 1500 lines), debugging is bit tedious.
    The screen has many dynamic combos, growing grids, popups generated from the grids.
    Suggest me a solution.
    Thanks in Advance,
    Shyam

    Hi , If i understood properly , u r stuck with design problems. so u follow the MVC controller technique to solve this problem. split all jsp in 4 parts or more than that if posibble. just pass the controll to the MVC object with the parameter based upon the selection of combobox. this MVC will analyse the objects parameter and based upon that will redirect to jsp's
    u have to now seperate the business logic as well as the presentation logic. use Jsp's for presentation logic and for dynamic popup of the message boxes or loading combo boxes. Use JSP for business objects and use the usebean tags in the jsp's.
    This will solve u r problem . try to break evry thing as simple objects as posibble. let it be even a chain of objects . it will be easy for u to debug as well as for the session management.
    Good Luck.
    if u need any more please feel free to mail me at [email protected]

Maybe you are looking for

  • NFe de entrada com XML versão 1.10 em ambiente com versão de XML 2.00

    Olá colegas, Nossos locais de negócio estão configurados para a NFe na versão XML 2.0. Com isso, todas notas criadas, tanto de saída quanto de entrada são da versão 2.00 do XML. Entretanto, ainda recebemos notas de clientes na versão do XML 1.10. Com

  • Mail icon no longer displays unread message count

    The mail icon in my dock no longer displays the number of unread messages. Is there a fix for this?

  • 11.3 "Trying to restore MBR based image in to UEFI machine"

    Hey guys, We recently upgraded to ZCM 11.3 from 11.2.4. When we image our PC's we boot them from Boot CD's, we can then choose the automatic option and the imaging bundles on the server are applied to the PC's. Since upgrading to 11.3, and now using

  • (CS3-JS) Tables - HeaderRows

    Hello, First, sorry for my english. I want to apply a diferent paragraph style to the first row (of the body of the table. The first row has hightest before space). I have one header row, than break once per page, and I don't know how can I determine

  • How to mapped CO2 in the process

    Dear Master, In the Beer manufacturing process Co2 is produced ( it is taken as byproduct ) & that co2 is used for filling cylinder in Keg.But the amount of CO2 produced is less so it is procured from other vendor to fulfill the requirement. Please e