Strange TableView problem when entering editing mode.

I'm having a problem when entering editing mode in a tableview. What happens is the cell data from the section below is being displayed on top of the last cell in the current section.
The narrower cell, with the plus sign on the left side, is briefly visible before (a copy of) the cell from below covers it up.
Has anyone else seen this behavior? I'm really stumped here.
More info, or how my table isn't standard: Each of the three sections is populated from a list. If the user has previously deleted one of the items from the section, only then is the plus sign shown. Otherwise, only the delete sign is shown. In other words, if there isn't anything to add, then the plus sign with the associated ...add a new X is not shown. This all works correctly. The counters work. The lists of previously deleted items are populated correctly.
What doesn't work is the last row of the second section being covered by a copy (at full width) of the first row from the third section. The first and third sections both look correct. phew, I hope this makes sense.
Here is what it looks like:
Sizes
- Size 1
- Size 2
+ ..add a new Size
Measurements
- Measurement 1
- Measurement 2
Note 1 << this is the problem row
Notes
- Note 1
- Note 2
+ ...add a new Note
Thanks for any help you can provide.
Ty

OK, after more digging I answered my own question.
The problem was the section order for added and deleting rows in setEditing. I was setting the indexPathForRow in section 2, then, 1, then 0. If I do the update in order 0, 1, then 2 it works fine in 2.0, 2.1, and 2.2.

Similar Messages

  • Directly enter edit mode of JTable cell

    Hi Everyone,
    On my UI, i am showing editable JTable. When I click on table's row / cell, it selects the row. Fine.
    But I want that it should directly enter edit mode of cell and the whole text is to be selected and highlighted and focussed.
    Thus, user can directly type the new text.
    Please suggest correct approach to handle this scenario.
    Thanks in advance.
    Girish Varde.

    Here is my attempt at solving this problem:
    **  For text selection you have two choices. Remove the "xxx" from either
    **  editCellAt() or prepareEditor() method.
    **  The difference is in how mouse double clicking works
    **  To place a cell directly into edit mode, use the changeSelection() method.
    **  Be aware this will generate a TableModelEvent every time you leave a cell.
    **  You can also use either of the above text selection methods.
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.table.*;
    public class TableEditCell extends JFrame
         public TableEditCell()
              String[] columnNames = {"Number", "Letter"};
              Object[][] data = { {"1", "A"}, {"2", "B"}, {"3", "C"} };
              JTable table = new JTable(data, columnNames)
                   //  Place cell in edit mode when it 'gains focus'
                   public void xxxchangeSelection(
                        int row, int column, boolean toggle, boolean extend)
                        super.changeSelection(row, column, toggle, extend);
                        if (editCellAt(row, column))
                             getEditorComponent().requestFocusInWindow();
                   //  Select the text when the cell starts editing
                   //  a) text will be replaced when you start typing in a cell
                   //  b) text will be selected when you use F2 to start editing
                   //  c) text will be selected when double clicking to start editing
                   public boolean xxxeditCellAt(int row, int column, EventObject e)
                        boolean result = super.editCellAt(row, column, e);
                        final Component editor = getEditorComponent();
                        if (editor != null && editor instanceof JTextComponent)
                             if (e == null)
                                  ((JTextComponent)editor).selectAll();
                             else
                                  SwingUtilities.invokeLater(new Runnable()
                                       public void run()
                                            ((JTextComponent)editor).selectAll();
                        return result;
                   //  Select the text when the cell starts editing
                   //  a) text will be replaced when you start typing in a cell
                   //  b) text will be selected when you use F2 to start editing
                   //  c) caret is placed at end of text when double clicking to start editing
                   public Component xxxprepareEditor(
                        TableCellEditor editor, int row, int column)
                        Component c = super.prepareEditor(editor, row, column);
                        if (c instanceof JTextComponent)
                             ((JTextField)c).selectAll();
                        return c;
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              TableEditCell frame = new TableEditCell();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • Microsoft Powerpoint - when entering presentation mode on a tv via vga - you enter a mode where you can see your slides order and manage this, whereas everyone else only see's the highlighted slides in fullscreen - mine is in reverse and i cant change?

    As i said above,
    Microsoft Powerpoint - when entering presentation mode on a tv (via vga to dongle) - you enter a mode where you can see (on your laptop screen) your slides order and manage this, whereas everyone (on the tv) only see's the highlighted slides in fullscreen - My powerpointy does this in reverse upon entering presentation mode and i cannot from there change this back, does anyone have any help they can provide, is so thankyou very much

    As i said above,
    Microsoft Powerpoint - when entering presentation mode on a tv (via vga to dongle) - you enter a mode where you can see (on your laptop screen) your slides order and manage this, whereas everyone (on the tv) only see's the highlighted slides in fullscreen - My powerpointy does this in reverse upon entering presentation mode and i cannot from there change this back, does anyone have any help they can provide, is so thankyou very much

  • Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    1) Is it a video clip? Something you recognize?  To be clear, it's displaying at a point in your exported movie but doesn't appear at all in the sequence?
    2) What are your sequence settings?  Right-click your sequence and choose "Item Properties" to verify.

  • Native Notes app requires two taps to enter edit mode

    I use the native notes app a lot. With iOS 3, I would tap on the name of the note to view it, then tap once to enter edit mode (the keyboard appears). Now, with iOS 4, I have to tap on the note twice to enter edit mode. This is very annoying.
    It might have something to do with the new feature in iOS4 that recognizes dates. If I tap anywhere in a note that is even remotely close to something it has recognized as a date, I get the “create event” pop-up instead of the keyboard.
    Does anyone else experience this? Or is it only me? Unfortunately, I cannot delete notes and reinstall it… Is there a fix for this?
    Details: 16GB 3GS, iOS 4.0.1

    More information:
    I noticed that if I create a note on the iPhone, it works fine. I can enter edit mode with one tap. But once I sync that note to Outlook, or if I create a note with Outlook, it takes two taps to enter edit mode.
    This did not happen with iOS 3

  • Powerpoint 2011 Crashes When Entering Slideshow Mode attached to Projector.

    My MacBook Pro running Snow Leopard 10.6.8 crashes every time I try to enter slideshow mode in Powerpoint 2011 if I am driving a projector.  It does not crash if I enter slideshow mode without the projector, of if I connect to the projector but don't enter slideshow mode.  I give a lot of presentations, so this is a real problem.

    Confirm I have had the same problem with Office 2011 Powerpoint. Crash to unresponsive black screen, must force off with power button. 15" Mid-2010 MacBookPro 6.2 MC373C/A 4GB RAM and Snow Leopard 10.6.8
    Began slowly/intermittently in July when I was working daily with the pptx. Was then crashing with a 2nd monitor attached going into slide show mode. Crash problem became more frequent over time.
    Now the crash occurs with certainty in almost any configuration - slide show with 2nd monitor/projector, or without any monitor/projector or other peripherals attached, and with either the battery or 110v MagSafe power supply.
    I have tried creating an alternate user account - and the problem again starts randomly and acelerates in frequency.
    Uninstalled and reinstalled Office2011 for Mac as per MS instruction support pages. Same crash, on launch , when opening a file after launch, or when clicking onto a different slide if a successful launch does occur.
    Powerpoint at this time and in this condition is unuseable.
    Too bad because I have another presentation to prepare and give tomorrow, and I have already paid for and now depend on the MBP, and at this time the MSOffice2011 software.
    If anyone has solved why this problem is occurring (I see it occurs frequently enough that similar questions appear in many forums) - please share your insights and a solution if you have one? ThankYou.

  • Problem in enter query mode

    Hello Oracle experts,
    When I do some query in enter query mode more than the required no.
    of rows are appearing in detail block. For example If we have only 2 rows in detail table corresponding to one row in master then only those two rows should appear in detail block during query which are related to the corresponding master block record. But more rows are appering. What may be wrong please guide.
    Thanks in advance
    Ajay

    Hi Ajay,
    Is your relation between the two blocks applied correct?
    Grtz.

  • Disable column when in edit mode.

    Hallo,
    I want the user to be able to input data in some columns of my ALV Grid, but not in all. How can I disable some columns for input, when the ALV Grid is in Input/Edit mode?
    Thank you,
    Manuel

    Hi,
    Step 1.
    Add this feild in ur Internal table.
    field_style TYPE lvc_t_styl, "FOR DISABLE
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
    gd_layout-no_input          = 'X'.
      gd_layout-cwidth_opt = 'X'.
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra = 'X'.
      gd_layout-info_fname = 'LINE_COL'.
    ENDFORM. " BUILD_LAYOUT
    *step-2 * Call this Subroutine before Fieldcatalog........
    FORM set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    clear : ls_stylerow.
    clear : wa_final-field_style.
    refresh WA_FINAL-FIELD_STYLE[].
    Populate style variable (FIELD_STYLE) with style properties
    The following code sets it to be disabled(display only)
    if child deal Ticket Number Approved or rejected.
      LOOP AT it_final INTO wa_final.
        IF wa_final-apprd = 'X' or wa_final-rejct = 'X'.
            ls_stylerow-fieldname = 'APPRD' .   
            ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
            APPEND ls_stylerow TO wa_final-field_style.
            MODIFY it_final FROM wa_final.   "my Internal table, Replace ur internal table.
            ls_stylerow-fieldname = 'REJCT' .    " ur field name
            ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
            APPEND ls_stylerow TO wa_final-field_style.
            MODIFY it_final FROM wa_final.
       endif.
    like this u have to add for all colunms in ur report which u
    want to disable.
    Note the stylerow appending should be in Alphabetic order
      ENDLOOP.
    ENDFORM. " set_specific_field_attributes
    Thanx
    bgan.

  • When in Edit mode the site preview only shows 1/3 of the site

    How can I get it to show the full page? This is what I see when I go into Edit mode, and I can't pull the edge of the page across. Being a newbie, I'm sure I've got some setting inproperly filled out, and any help would be greatly appreciated.
    Thanks

    Make sure the paragraph style applied to the chapter title (if that's the first line of each chapter) is tagged. Open the paragraph style and go to Export Tagging and check Split Document (epub only). Then when you export (assuming you are using reflowable) under General>Split Document check Based on Paragraph Style Export Tags. Try it and let us know if this helps.

  • Audio cuts out (mDP - HDMI) when entering clamshell mode

    Hi - my MBA is late 2012 (8 GB, 2 GHz i7, 10.7.4). When I hook it up to the LED TV (a Toshiba 40L2200U) using a Folsom miniDisplayPort to HDMI cable (no separate adaptors, it's a 6' cable with mDP at one end and hdmi at the other) it works fine - audio is transmitted and it comes through the TV speakers. But when I close the lid and try to continue watching with the laptop in clamshell mode (a magic trackpad is around that is paired to it), video continues just fine but the audio cuts out.
    Annoyingly, when I open the lid back up the audio still doesn't work. I have to futz around a while before it comes back (restart any programs with audio output, unplug the cable and plug it back in again, move the audio output in system preferences to core audio and back again to the TV etc.)
    Does anyone know what's up with this? I don't think it can be the cable's fault--clearly it's able to transmit audio along with the video, and nothing changes about the cable when I close the lid.
    Could anyone with a similar setup (MBA/Lion -> TV via HDMI adaptor) let me know if you are able to enter clamshell mode without losing audio over hdmi?

    In 'alsamixer' I have a setting called ''Headphone Jack Sense' which if enabled mutes the speaker when a headphone jack is inserted.
    What's the output of
    amixer get 'Headphone Jack Sense'
    When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode
    like this
    It makes the code more readable and - in case of longer listings - more convenient to scroll through.

  • Problem when entering time machine

    Ok ever since Leopard when entering time machine it freezes for the longest time causing me to reboot the computer. Why is that my eMac meets the min requirements and I have finder on set to coverflow. When entering into time machine it freeze during the process of trying to display coverflow. The only way to bypass this is for me to browse the backup drive without entering to time machine like if it was a regular drive then copy and past.
    Message was edited by: PokemonFan1987

    Does anyone know?

  • SOLAR01: Problem when entering the same T-Code twice

    Hi all,
    I am encountering a problem with Solution Manager 4.0, transaction SOLAR01.
    When entering the same transaction code twice (in the Transactions tab) for a particular Business Process, I get the following error message:
    "The specified key already exists"
    Therefore, unless I flag the object for deletion (by selecting the row and choosing the "Delete Row" option), I am not able to proceed further.
    Has anybody else encountered this problem and is there a proper workaround?
    Thank you,
    Orestis

    Hi Jason,
    Thank you for your post.
    The reason for entering the same transaction twice is to test the sequence of the business process.
    So, for a specific system integration scenario, I may need to create a customer in one transaction and return to that same transaction later to modify the customer (this is just an example). As one transaction may be used for different tasks at different points in time, I would like to reflect that sequence in the Solution Manager.
    Kindly advise if you believe this is not the correct approach or if Solution Manager does not support this kind of "sequencing".
    Thanks for your support!
    Orestis

  • Fonts are getting clipped when in edit mode. How can this be remedied?

    I'm using InDesign for layout. I Export... the layout as a PDF… when I edit text boxes within Acrobat, characters along the left edge are suddenly clipped.
    The text is fine until I attempt to edit the lines of copy. For instance, the leading edge of a “J” gets trimmed off as soon as the box is selected for editing.
    Has anyone else experienced this?

    See:
    *https://support.mozilla.org/kb/latest-firefox-issues#os=mac&browser=fx9

  • Disable column when in edit mode 2

    Hello experts,
    some time ago I posted the thread: Editable ALV: Check Entries in order to disable an ALV grid column for user input.
    How can I disable the column even if the user adds a new row to the editable ALV Grid control?
    and
    How can I show in the disabled column information that is read from the database during user input? For instance, if the user presses ENTER?
    Thanks for your help! Obviously, points will be rewarded.
    Manuel

    Hi 
    U need to go for styles in alv grid.  U can define a style for each cell in which u can manage editable or disable in that.
    This u can handle in PBO each time conditionally.  See the below code.
    Add one field in your output internal table as below for populating the style.
    CELLTAB    TYPE LVC_T_STYL,   " for input enabling the cell.
    This is a table type.  U need to populate this field in each row with its type to enabled or disabled as below and style for which field in your internal table.  Here it is WERKS.
    CELLTAB-FIELDNAME = 'WERKS'.
    CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    or
    CELLTAB-FIELDNAME = 'WERKS'.
    CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED
    insert this table in the field CELLTAB of  your internal table.
    in each row.
    And populate the layout with style field name.  Here our field is CELLTAB.
    GS_LAYOUT-STYLEFNAME  = 'CELLTAB'.
    GS_LAYOUT-EDIT        = GC_X.
    This can solve ur problem
    Venkat.

  • Vertically-aligned tables shift down when entering/editing text within the table.

    Hi all,
    We have a sudden problem that is occurring, and I've done a lot of searching without finding anything close to this happening elsewhere.
    If there is ever a table that is aligned vertically within a text frame, you cannot edit the text without having it shift down one line break for every letter you type, until it's bottom-aligned within the frame. You can then click "align center", and it will re-align itself. Then, if/when you need to change even one letter again inside the table, it will shift down one line.
    We've tested it with two different docs on both Mac and PC, with the same problem. I've cleared my prefs on the Mac to see if that would make a difference, and it hasn't done anything.
    Any thoughts here? I can't recall anything that would have changed since this started happening, but it won't leave us alone now!
    Thanks!!

    Very interesting. I do lots of tables but don't vertically justify so I have never run into this. However I can confirm this behavior on a new clean test page I made, using InDesign CS5 (7.0.3) on Mac OS 10.6.6. I have no other problems with InDesign; it is running flawlessly. And no weird plug-ins or system hack software.
    My test file uses my default font (Adobe Minion Pro) and the default table (Insert > Table).
    It also shifts down when I delete a character in a cell. And the shift for me is more than one carriage return. I can get it back to center-aligned by top aligning and then choosing center align again.

Maybe you are looking for

  • Printing on paper without spaces ?

    Sir, I have a problem with printing the page of course it is printing the page without any problem but the problem does exists in the setup.I have used the code provided in the forum for printing.Where here when the printing is on, the printer starts

  • ADRC DATE_FROM DATE_TO

    Hi experts, We want to download address (customer and supplier) from SAP R/3 4.7 to a specific application (TMS). In the adrc table, it exists 2 fields Date_from Date_to. Can you advice how this fields are feed ? Is it a customizing point to activate

  • Nikon D70s owners: Squeaky Wheel Gets the Grease... NO RAW?

    NIKON D70s owners: Maybe if enough people squeak about iphoto not supporting (importing) RAW files on the BIGGEST SELLING SLR CAMERA ON THE MARKET Apple will bump it to a higher priority. I was really suprised (and frustrated) a lack of support for t

  • Sapinst: password

    Hi, I have a server running EP 6.0 portal. I'm logging in as user called tp2adm. This is a SAP System Administrator. The problem is that when I'm starting sapinst to install Adobe Document Service, the password field only takes 8 characters. But my t

  • I can't purchase anything through iPad. It says to contact the iTunes support team.

    I tried purchasing few ours back but there weren't enough funds in the card. That's when the problem occurred. But now I'm shore the card works but my iPad sends me a msg to contact u guys. Please solve this issue as fast as possible. Thank u.