Setting ComboBox editable/non-editable in JTable

Hi,
I had a problem I am having a JTable and one of the column in ComboBox.Basing on a cell value the ComboBox should be editabl.e/Non-editable.
I used the setValueAt() method of JTable to set the comboBox and also implemented the cellChangeListener.But it did not work while loading the data intially..Plz help me....
Regards
Kiran

Kiran,
You ignore the words of a goddess at your peril: http://forum.java.sun.com/thread.jsp?forum=57&thread=556061&tstart=15&trange=15
It sounds like some of the values in your TableModel are JComboBoxes, no? That's seems an odd thing.
Are you confusing the data with cell editors? What is your data design?

Similar Messages

  • Set editable/non-editable checkbox in alv grid

    Hi all,
    How to set a checkbox in alv grid in editable/non-editable. i am using alv gird display function module for this. i tried to used method  cl_gui_alv_grid=>mc_style_disabled. but its not working. is it possible to have this functionality in grid? please help. thanks in advance.

    Hi,
    Try like this.
    CALL METHOD gr_alvgrid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    CHANGING
    it_outtab = gt_list[]
    it_fieldcatalog = gt_fieldcat
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4
    regards
    Rajesh kumar

  • How to set the field non-editable in the classical report..

    Hi..
              How to set the field non-editable in the classical report..

    Hi experts,
    For the component 'ICCMP_EMP_SRCH' there is a view 'BUPAEMPSEARCH' , which has 2 context nodes 'CUSTOMER' AND 'SEARCHEMPLOYEE' , i need to add the field 'NICKNAME' which is part of the 'CUSTOMER' context node on the search screen. Currrently all the fields on the screen screen are from the 'SEARCHEMPLOYEE' context node. when i did the configuration , the 'NICKNAME' field is greyed out . I have already generated the Getter ,Setter , GET_I, GET_M methods for the 'NICKNAME' field and the context node and controller class and context class are all active .
    on debugging the GET_I method, i see that rv_disabled = 'TRUE' and the current = collection_wrapper->get_current( ) is returning empty value .
    for this rv_disabled to be set false , the code below is not triggered since there is no value in current.
    IF current->is_property_readonly(
    'NICKNAME' ) = abap_false. "#EC NOTEXT
    rv_disabled = 'FALSE'.
    ENDIF.
    when i check for other search fields of context node 'SEARCHEMPLOYEE' , all the fields are set to rv_disabled = 'FALSE'.
    can anyone suggest how to approch this. iam i missing any binding between context nodes or any activations ?
    The field properties are set as Input field and the display checkbox is not checked.

  • Editing non-editable regions as the webmaster

    I'm just learning to use Contribute, and I want to enable my client to edit some regions and not others (obviously). But I want to be able to edit the non-editable regions myself, in Dreamweaver. For example, I don't want them to be able to mess with the nav bar, but I do want to be able to specify which nav item is active when creating a new page. When I open a page based on a template and try to change those regions, it won't let me. Is there any way to make a region something I can edit, but my client can't? Thank you!

    In Contribute you can add/edit the contents inside the editable regions only. You can edit the contents of the non-editable region of the template using Dreamweaver.

  • ALV grid field editable/non editable at runtime

    Hi All,
    I am working on alv grid using containers. I have to make few cells in grid to editable and few othres to non editable which I did using styles by defining table type lvc_t_styl and updating my main internal table. Now once grid is displayed for first time (using set_table_for_first_display) it has required fields in editable and non editable as required. But now on triggering of data_changed event I have to change the editable cells to non editable and the non editable cells to editable. I tried doing this as same way as I have done before calling set_table_for_first_display method i.e. by  defining table of type lvc_t_styl in data_changed event and modifying my main internal table but this time the editable fields are changed to non editable and again becomes editable. Same problem with non editable cells also. They become editable and again becomes non ediatble of there own. Can anyone suggest any solution.
    <b>Note: Points awarded for helpful answers</b>
    null

    Hi,
    Check this link.I am explaining the steps for this.
    Kindly reward points by clicking the star on the left of reply,if it helps.<a href="https://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database(OOPS)">Editing OOPS ALV</a>

  • How to set JTable cell editable/non-editable dynamically using NetBean?

    I am using NetBean 6.5, create a database desktop application, I using the persistence entity manager to bind my JTable with database.
    Now, I want to set practicular cells which are enable and disable, I tried to create my own table model and override the isEditable() method, which it seems didn't work. I guessed the problem is the persistence connection between my Table and database.
    How can I solve it? Any example? I just googled the web and can't find example which use netbean combined with database. I know that a single JTable would work when creating your own model.
    thx.

    I know what coding i did, Yes u r right but im new to GUI programming only,
    That's why i posted it to forums, I gone through the Control Flow Statements link what u have given.
    U didnt get my question at all.
    Again the problem im facing is the table is already displayed with 2nd column uneditable.
    When some Action done on table, i need to make 2nd column editable at run time.
    Thanks if u provide me the solution instead of deciding what type of programmer im.

  • Editable / Non editable input field CELL (individually) on ALV dynamically

    Hi again,
    I need more help with an issue.
    I have an ALV table with three columns that is necessary put values into input field cell editors, but these cells should be editable or not depending of business logic. I've got make editable or non in entire ROW LEVEL (method set_read_only_fieldname( 'READ_ONLY' )., but ¿how can I set editable or non at individual cells?
    Any idea to do that?
    Regards
    Edited by: vanbelal on Mar 24, 2010 3:33 PM

    Can you paste any example source code?
    I don't know how can I bind enabled property dynamically to individual CELL, I'm setting properties to whole column.
    lt_columns = lr_column_settings->get_columns( ).
      LOOP AT lt_columns INTO ls_columns.
             if ls_columns-id = 'COLUMN1' or 'COLUMN2' or 'COLUMN3'.
              CREATE OBJECT lr_input_field
                EXPORTING
                  value_fieldname = ls_columns-id.
              ls_columns-r_column->set_cell_editor( lr_input_field ).
    Should I put business logic here? how can I set enabled or not on CELL, at this point I'm processing whole column!!
              lr_input_field->set_enabled( abap_true ).
            endif.
      ENDLOOP.
    Edited by: vanbelal on Mar 24, 2010 4:12 PM

  • Can't edit editable, but _can_ edit non-editable

    Hi, and thanks in advance to anyone who helps me with this.
    I've created a website using Dreamweaver CS3. You can see it
    at
    http://www.mochihead.com .
    Right now, I'm creating pages where I will sell some t-shirts.
    Everything seemed to be working fine, as I created them pretty much
    like the detail pages of the books I already have on the site
    (which are working fine). However, when I tried to put the PayPal
    buttons on the page, I realized that I can't edit the code anymore
    and therefore cannot add the PayPal button. And what's even more
    weird is that I _can_ edit the part of the page that is supposed to
    be the template. The code that starts <!-- InstanceBeginEditable
    name="MainContentEdit" --> is gray, and continues to be gray all
    the way until the </html> tag at the end of the page. The
    template content, however, is not gray.
    This has never happened to me before. Also, when I go back
    and open the corresponding template, it has an asterisk by the
    title, as if I had edited it before I even opened it up.
    The only thing that I did to this new page that I hadn't done
    in the past is to add an "open browser window" behavior, so when
    the user clicks on the picture of the t-shirt, a pop-up comes up
    with a picture of the shirt's design.
    Can anyone help?
    Here is the code:

    Yes, here is the link:
    http://www.mochihead.com/Templates/mochi_detail.dwt
    Thank you so much for your help. I've been so frustrated.
    quote:
    Originally posted by:
    Newsgroup User
    For sure you need to be editing the template file. Can you
    upload it and
    post a link to it, please?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mochihead" <[email protected]> wrote in
    message
    news:gr1imv$7it$[email protected]..
    > Thanks, Garry. Yes, I think you're right. Can you tell
    me how to fix it?
    > That
    > part of my code is grayed out, so I can't delete it. And
    when I go to the
    > template, there is no <!-- InstanceEnd --> to
    delete.
    >
    > :( help?
    >
    >

  • How to set a column in JTable non-editable?

    I have a JTable, and how can I set a particular column non-editable?
    Thank you.

    You could create a sub class of DefaultTableModel, you pass the column number to the constructor or you add a method like setColumnEditable(0, false); to set column 0 non-editable.
    You overwrite the method isCellEditable so it will return false when the column number that is passed to the method is 0 (if you want to have column 0 non-editable).

  • Non-editable JTable cells?

    Is there any way to make all the cells in a JTable non-editable? In the API I see the isEditable method, but no setEditable method. Any suggestions?

    You have to set it in the TableModel.
    TableModel model = new AbstractTableModel()
    public int getRowCount()
    return 10;
    public int getColumnCount()
    return 5;
    public Object getValueAt(int row, int column)
    return "( "+row+","+column+" )";
    public boolean isCellEditable(int row,int column)
    return false;
    The one given above is a sample to show you how to set a cell non-editable on the cell. You have to customize it for your table model.
    Thanks,
    Kalyan

  • How to make non-editable ComboBox in flex.

    Hi All,
       I defined ComboBox as below and I'd like to make this combobox to non-editable(readonly)
      <mx:ArrayCollection id="bb_list">
            <mx:Object data="" label="-Please Select-"/>
            <mx:Object data="Y" label="Yes"/>
            <mx:Object data="N" label="No"/>
            <mx:Object data="D" label="I Don't Know"/>
        </mx:ArrayCollection>
      <mx:ComboBox  width="152" id="broad" dataProvider="{bb_list}" change="bb_service()" editable="false" > </mx:ComboBox>
    Still it is displaying ComboBox where user can change value from this ComboBox, can anyone let me know how to make this ComboBox to non-editable.
      Thanks in advance.
    Regards,
    Sharath.

    I really don't understand what you're trying to do.
    In the ComboBox default state, you cannot type text into the non-drop-down portion.  If you set it to editable, then you can type text in the non-drop-down portion.
    But, in both of these situations, the user can still open the drop down and select a new value.
    Do you want to display a drop down, but not give the users the ability to select a new option?  If so, you might not be able to work something up by listening to the change event, although I would expect that to be non-conducive to good interface design.
    If you don't want to show the drop down at all, use a Text component instead of a ComboBox.
    You might also try disabling the ComboBox in order to prevent the user from interacting with it.
    If you can elaborate on what behavior you're expecting and why it is unexpected, that might help us point you in the right direction.

  • Needed to make baseline date non-editable

    Hi Gurus,
    My requirement is to make baseline date non editable for miro.Please help how to proceed for this.

    Hi,
      In txn. SHDO create a screen Variant for the tcode MIRO  (prog. SAPLFDCB, Screen 0020).
    Then click on Create icon from top
    It will open the MIRO screen, then click on payment tab, maintain entries in baseline date then clik enter it will popup one screen, there you need to flag under "output Only" for Baseline date, then save.
    this setting will make non editable field.
    Regards
    GK.
    Edited by: Gnana Kumar on Oct 28, 2010 2:34 PM

  • Variant CO11N & CO15 good movement non editable

    Hi team
    I need you HELP!!
    I have generate a transaction variant for tcodes: CO11N and CO15 then I have assigned some users to both transactions.
    in SHD0
    First I set the users to CO11N variant --> assign variant and set proposal.
    with the same group of user i set the variant for tcode CO15.
    when testing I realized the the field quantity in Good movements was non editable in CO15 (the last configuration for the list of users).
    but in CO11N it was editable
    I know there is an option to active the variant at the begginig of the transaction but this is not a solution since it makes for ALL non editable and not only the listed users. Also it affected all the plant.
    How can I make it non editable in CO11N and CO15 at the same time for the list of users??
    thks in advance!!

    PLS help!!!
    I have analized the variant again.. but i can not find how to make non editble the quanty field in TCODE CO11N and CO15 at the same time.
    I test with 2 different users:
    user1 has the variant assigned and not user2
                                   co11N                            co15
                  user1           editable                       non editable
                  user2           editable                       editable
    I can not active the variant because it will be non editable for ALL the users without taking care the assignment.
    pls help!!!

  • How to make a editable section non editable?

    When I created my sample site in DW4, I made my template with editable/non editable section. My footer I made editable, now I would like to add a few links on the footer (contact me, about me, etc). I  did place an image,background color in the footer.
    Should or can I convert the footer of my template to non editable so that I do the above and have the change made to all pages in the form of a libary item, or is there another way to do this efficently?
    As always thanks in advance.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>jimmucklinphotography</title>
    <!-- InstanceEndEditable -->
    <style type="text/css">
    <!--
    body,td,th {
    color: #000;
    a:link {
    color: #333;
    text-decoration: none;
    a:visited {
    color: #900;
    text-decoration: none;
    a:active {
    color: #F30;
    text-decoration: none;
    a:hover {
    text-decoration: underline;
    -->
    </style>
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    </head>
    <body text="#000000" link="#000000" vlink="#333333">
    <table width="960" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/banner2.jpg" width="960" height="75" /></a><img src="images/banner1.jpg" width="960" height="50" /></td>
      </tr>
    </table>
    <table width="960" border="0" cellspacing="0" cellpadding="3">
      <tr bgcolor="#00FFFF">
        <td bgcolor="#CCCCCC"><strong><a href="index.html">Home</a> || <a href="html/weddings/weddings.html">Weddings</a> || <a href="html/seniors.html">Seniors</a> || <a href="html/services/otherservices.html">Other Services </a>|| <a href="html/gallery.html">Gallery</a> || <a href="html/printsprices.html">Prints and Prices </a>|<a href="html/events.html">| Events ||</a></strong></td>
      </tr>
    </table>
    <table width="960" border="0" cellspacing="0" cellpadding="3">
      <tr bgcolor="#00FFFF">
        <td bgcolor="#CCCCCC"><!-- InstanceBeginEditable name="sub" --><!-- InstanceEndEditable --></td>
      </tr>
    </table>
    <table width="960" border="0" cellspacing="0" cellpadding="40">
      <tr>
        <td><!-- InstanceBeginEditable name="content" -->Index page<!-- InstanceEndEditable --></td>
      </tr>
    </table>
    <table width="960" border="0" cellspacing="0" cellpadding="1">
      <tr>
        <td align="center"><!-- InstanceBeginEditable name="footer" --><img src="images/footer2.jpg" width="960" height="45" /><!-- InstanceEndEditable --><br /> </td>
      </tr>
    </table>
    </body>
    <!-- InstanceEnd --></html>

    When I created my sample site in DW4
    Just to avoid confusion, the version of DW you are using is NOT DW4, it's DWCS4.  DW4 was released in 1998 and superseded by DMX (6.0).
    Should or can I convert the footer of my template to non editable so that I do the above and have the change made to all pages in the form of a libary item, or is there another way to do this efficently?
    Placing a Library item in that footer editable region would certainly give you the flexibility you are seeking, but there is a more efficient way to do this.  That way would be to use a server-side include.  The disadvantage of using a Library item is that after making any changes to it, you must upload every affected page to the server again (since, as with Templates, only local files are affected by these changes).  On the other hand, the disadvantage of using server-side includes is that you must change your filenaming system site-wide.  If your site is not too large (say <20 pages), and if you are not so experienced with server stuff, then Library items may be your best method.

  • How to make a custom property editable/not editable in DRM

    Hi,
    How do we make a particular field i,e custom property category field as editable whereas make an another field i,e another custom propertyfield value as non editable in a same hierarchy within a particular version.
    user has an admin privilage in the above case.

    Hi,
    If the user is an admin he will have access to edit all properties...but before that... what do you exactly mean by making a property editable/non editable? The only non editable properties are the derived properties... if beyond that you need to make custom defined properties non editable you have to work with setting up the security where the very first step is to not to have normal users as admin in the system.
    Could you please detail out your requirement a bit more.
    Thanks
    Denzz

Maybe you are looking for

  • Problem in Desktop windows 8.1

    My desktop with windows 8.1 shows "monitor going to sleep" during my attempt to turn it on. After shwoing scanning of VGA, the message "monitor going to sleep" will appear and the monitor shuts down.  What could be the problem? how can it be fixed?

  • Calling Perl module in Java

    Hai, I like to know, How do I call a perl module from my java program such that the output of the perl module is used in my Java program ? Regards ackumar

  • How to keep SCROLLING AT TOP

    I have a JScrollPane in which I put JTextArea and it goes always to the end. How can I keep scrolling at the top of the pane? Thanks alot Tamer

  • Do I need to install virus protection for the windows portion of the partitioned hard drive on the MacBook Pro?

    Do I need to install virus protection for the windows portion of the partitioned hard drive on the MacBook Pro?

  • E61 DTMF Problem

    I am not sure if thi is the correct section to log thisin, but bare with me if it is not. I am having problems using DTMF with my E61 when I am on voip/internet calls. The calls work well, but I am not able to get any DTMF either by directly pressing