Rendering Delete button in the table

Hi,
I have created a column in the table and dropped the delete operation in that column.
My case is that whenever the create insert button is clicked a new row is added to the table and only to that row the delete button should be rendered, all the other older rows the delete button should not be rendered.
This is similar to the advanced search option in the adf, when we add fields we will get a delete button at end of each field.
How to implement the same case in the table ?

I have given set property listener to create insert button and named to be 'new', then in the rendering condition of the delete button i gave as #{pageFlowScope['return']=='new'}. so initially the delete button is not rendered in the existing rows in the table but when create insert button is clicked delete button is rendered in all the existing rows and also in the newly created row.
Am not sure whether this is the right approach.

Similar Messages

  • Delete entries from the table

    Hi folks,
    I have delete program to delete entries from a custom table and has only one feld in it.
    tables: ZABC
    selection-screen begin of block B1 with frame title text-110.
    select-options: P_KOSTL for ZABC-KOSTL.
    selection-screen end of block B1.
    delete from ZABC where KOSTL in P_KOSTL.
    Upon executing I am entering certain cost center ids on the selection screen to delete them from the table.It did not work.
    what is it I am missing?
    Thanks,
    SK

    Hi,
    Try this sample code..Replace ZABC with your table..
    TABLES: ZABC.
    selection-screen begin of block B1 with frame title text-110.
    select-options: P_KOSTL for ZABC-KOSTL.
    selection-screen end of block B1.
    START-OF-SELECTION.
    * Delete the records from the table.
    DELETE FROM ZABC where KOSTL IN P_KOSTL[ ].  " [] for the select-options.
    IF sy-subrc <> 0.
      ROLLBACK WORK.
    ELSE.
      COMMIT WORK.
    ENDIF.
    Thanks,
    Naren

  • About a month ago a song randomly appeared in my songs list and when I tried swiping to the left to delete the song it wouldn't slide over to show the delete button. The delete slide appears with all of my other songs except that one. P.S. iCloud is off.

    About a month ago a song randomly appeared in my songs list and when I tried swiping to the left to delete the song it wouldn't slide over to show the delete button. The delete slide appears with all of my other songs except that one. The ICloud songs are turned off and it wasn't iTunes Radio. 2 more songs like this have appeared and I can't delete them from both my iPhone or my computer (they don't even show up on my computer). If somebody knows how to fix this that would be amazing! Thank You.

    Have you:
    - Restore from backup. See:                                                
    iOS: Back up and restore your iOS device with iCloud or iTunes
      - Restore to factory settings/new iOS device.            
    If a PC
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8

  • Is there a way to move the delete button to the top?

    The version before the latest one had the delete button at the the top. This one has the delete button in the heading of the message window, below.

    The buttons are right where they have been for several version. You do have to add the one on the Mail Toolbar. Right click the Mail Toolbar and select Customize. Find the Delete button in the window that opens and drag it into place on the toolbar.

  • I want to get rid of a book in the iBooks "Purchased" collection, but when I touch the Edit button and select the book and then touch the Delete button, then the "Delete this copy" seletion, nothing happens.  How do I delete the book from the collection?

    I want to get rid of a book in the iBooks "Purchased" collection, but when I touch the Edit button and select the book and then touch the Delete button, then the "Delete this copy" seletion, nothing happens.  How do I delete the book from the collection?

    The Cloud by the song indicates that is is an iTunes purchase but it is not downloaded on the iPod. If you only want download iTunes purchases to show in the Music app go to Settings>itunes and pp Store and turn off Show aLL.

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • Delete button at the bottom for burning a new playlist.

    What genius put the delete button at the bottom setting cog for burning a playlist. I wonder how many people have inadvertenly deleted the playlist by double clicking.

    See:
    fix for Home button
    Fix a broken, unresponsive or sticky iPhone Home Button
    If you have iOS 5 you can turn on Assistive Touch in Settings>General>Accessibility. It adds a Home button and other buttons to the iPod's screen.

  • I Need Help In Deleting Table row by clicking on "Delete" button inside the

    Dear all,
    first i'm new to Swing
    i have created table with customized table model, i fill this table using 2d array, this table rows contains JButtons rendered using ButtonRenderer.java class and action listeners attached by the AbstractButtonEditor.java
    what iam trying to do is when i click on a specified button in table row i want this row to be deleted, i found some examples that uses defaultTableModelRef.removeRow(index), but iam using customized table model and the following is my code
    JTable tblPreview = new JTable();
              DbExpFormTableModel model = new DbExpFormTableModel();               
              tblPreview.setModel(model);
    //adding the edit button          
              tblPreview.getColumn("Edit").setCellRenderer(new ButtonRenderer());
              tblPreview.getColumn("Edit").setCellEditor(new AbstractButtonEditor(new JCheckBox()));
              //adding the delete button
              tblPreview.getColumn("Delete").setCellRenderer(new ButtonRenderer());
              tblPreview.getColumn("Delete").setCellEditor(new AbstractButtonEditor(new JCheckBox()));
    and here is the code of the code of my customized table model ( DbExpFormTableModel )
    public class DbExpFormTableModel extends GeneralTableModel
         public DbExpFormTableModel()
              setColumnsNames();
              fillTable();          
         private void setColumnsNames()
              columnNames = new String [5];
              columnNames[0] = "ID";
              columnNames[1] = "Database ID";
              columnNames[2] = "Prestatement";
              columnNames[3] = "Edit";
              columnNames[4] = "Delete";
         private void fillTable()
              int numOfRows = 2;     // = getNumberOfRows();
              data = new Object[numOfRows][5];          
              data[0][0] = "1"; //we must get this value from the database, it is incremental identity
              data[0][1] = "AAA";
              data[0][2] = "insert into table 1 values(? , ? , ?)";
              data[0][3] = "Edit";
              data[0][4] = "Del";
              data[1][0] = "2"; //we must get this value from the database, it is incremental identity
              data[1][1] = "BBB";
              data[1][2] = "insert into table2 values(? , ? , ? , ?)";
              data[1][3] = "Edit";
              data[1][4] = "Del";
    and this is the GeneralTableModel class
    public class GeneralTableModel extends AbstractTableModel implements Serializable
         public static Object [][] data;
         public static String[] columnNames;
         //these functions should be implemented to fill the grid
         public int getRowCount()
              return data.length;
         public int getColumnCount()
              return columnNames.length;
         public String getColumnName(int col)
    return columnNames[col];
         public Object getValueAt(int row , int col)
              return data[row][col];
         //i've implemented this function to enable events on added buttons
         public boolean isCellEditable(int rowIndex, int columnIndex)
              return true;
         public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    public void setValueAt(Object value, int row, int col)
    //fireTableDataChanged();          
    data[row][col] = value;          
    fireTableCellUpdated(row, col);     
    And Now what i want to do is to delete the clicked row from the table, so please help me...
    thank you in advance

    Hi Sureshkumar,
    1. Create a value attribute named <b>select</b> of type boolean.
    2. Bind the <b>checked property</b> of all the checkboxes to this attribute.
    3. Create an action called <b>click</b> and bind it to <b>OnAction</b> event of the button(whose click will check all the checkboxes) and write this code in that action.
    <b>wdContext.currentContextElement().setSelect(true);</b>
    Warm Regards,
    Murtuza

  • Delete button in ALV Table

    Hi,
    Does any one have a code sample for the ALV Table Delete button? When I hit the DELETE button the selected row gets deleted but how can I save this deletion to the database table so that when I do a refresh the deleted row does not re-appear.
    Thanks. Kim

    Hi Kim,
             i am sorry but I dont have a sample code for this .. but yes i can tell you a very simple logic here that should work fine ..
    When the user clicks on Delete Entry call method say "Delete_entry" and within this you can write code based on this logic..
    1) On_Action_Lead_Select should copy the content of that row to another context node say "Selected_Entry"
    2) Search for this entry in your internal table/database that was bound to the ALVs context node(data source) and remove it using standard functions
    3) again read the database/internal table data and bind it to the context node ..
    Your changes will be reflected in your ALV..
    I hope this helps and if it does please do award points
    Also please close the thread if the issue gets resolved ..
    Regards,
    Anoop

  • Datagrid item renderer delete button

    I have a datagrid with an item renderer. In the item renderer
    is a delete button img. Onclick it will remove the item from the
    datagrid with the exception of the first item. I am using outer
    document to call my function but when I do I get an error that says
    Attempt access of inaccessible method deleteContact through a
    reference with static type myTitleWindowContact?
    private function deleteContact(event:Event,data:*):void{
    if (contactData.selectedIndex >= 1) {
    caseVO.acCont.removeItemAt(contactData.selectedIndex);
    <mx:DataGrid dataProvider="{model.currentVO.acCont}"
    id="contactData"
    width="651"
    height="117"
    click="showForm()" >
    <mx:columns>
    <mx:DataGridColumn editable="false" width="5">
    <mx:itemRenderer>
    <mx:Component>
    <mx:HBox width="100%" height="15"
    horizontalAlign="center" verticalAlign="middle">
    <mx:Button
    icon="@Embed(source='/com/serg/reportingTool/assets/images/delete.png')"
    click="outerDocument.deleteContact(event,data)"
    label="D"
    toolTip="Delete"
    width="15"
    height="15"
    />
    </mx:HBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>

    That fixed that issue Thanks so much! One other question
    though. Is it possible to have my delete button appear on all items
    in the datagrid except for the first item??

  • Create / Delete buttons in the MSS POWL -- Performance Management EhP4

    When I log-in as manager, in the MSS POWL table, I see create / create multiple / delete buttons. How do you remove those buttons?

    For button manipulation and for removing buttons in POWL , you have to manipulate Feeder class CL_HRHAP00_STARTPG_POWL in that IF_POWL_FEEDER~GET_ACTIONS method.
    Mohan

  • How can I delete bookmarks on my toolbar when the 'bluestar' isn't illuminated? (Same for the 'delete' button in the library menu).

    Dear Sir/Madam
    I have had a look at your solutions page and have tried to use all the advice suggested however, when I try to delete three items on by Toolbar, none of them illuminate the 'BlueStar' which is beside their address. (I have successfully got rid of other items). I have also tried to delete the items in Firefox's library menu, however, the delete button their isn't illuminated either. I am now concerned that the items are spyware. I was thinking of reinstalling the software but, this would mean loosing all my Bookmarks.
    For your information, I have just updated Firefox to 28.0.
    I would appreciate your help with this matter.
    Kind regards
    Suzanne

    Dear sludge7051-x
    Thank you so much for all your help.
    I did as you said (after trying to find a very old mouse in my computer box in the attic!), and managed to delete the offending tags.
    Really appreciate your prompt response to my problem.
    Have a lovely weekend.
    Kind regards

  • Hi, I would like to know how can I recover a document from pages that I didn't save anytime and instead of clicking the button save I clicked the delete button at the end. Is there any way to recover it?

    Hi, I would like to know how can I recover a document from pages that I didn't save anytime and instead of saving the doc I clicked the delete button. Is there any way to recover it?

    Regardless of application, the first step that I take is to save and name the current document — even if it has no content yet. With Pages, this good habit enables autosave. As you add content, your document revision history is restorable via the File Revert To menu. The delete key has the same document foreboding as only teaching a pet raven to speak "Nevermore."

  • Add Delete button in the portal

    Hello,
    When you execute in the portal a query you get some results. You have the opportunity to Save this repport. You'll get 3 tabs, Favorites; Bex Portfolio; My Portfolio.
    When I want to delete some favourites is this impossible, I want to have an delete button in this screen. Is this possible? Probable you have to open the Web application Designer to solve this.
    Need some help to fix this
    Kind regard
    Bart Hazenberg

    You can write code to put your button under the IMPL class of your view in the method "DO_PREPARE_OUTPUT" method.
    Sample code is pasted below.
    IF gt_button IS INITIAL.
        wa_button-type     = cl_thtmlb_util=>gc_icon_new.
        wa_button-text     = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/NEW' ).
        wa_button-on_click = 'ON_CREATE'.
        wa_button-enabled = 'X'.
        APPEND wa_button TO gt_button.
        CLEAR wa_button.
      ENDIF.
    Also, please create an event handler "ON_CREATE" and code for the refresh in that method.
    Rg,
    Harshit

  • Buttons in the table

    Hi Sap Gurus,
    I have a normal table with buttons in one column. After clicking a button I need to have an button id and the line of the table witch includes this button. The button id is in the parameter of Event Handler, but I don't know how to check the line number. I found some information on SDN that I can use lead selection. But this is not a perfect solution, because befor clicking the button I need to mark a line in which this button exists. Do you have a better solution?
    Best regards
    Roman Byrdziak

    Hi Roman ..
    I tried your senario in my st=sytem its working fine for me ..
    Write this code in the on action of the button
    DATA lo_nd_scarr TYPE REF TO if_wd_context_node.
      DATA lo_el_scarr TYPE REF TO if_wd_context_element.
      DATA ls_scarr TYPE wd_this->Element_scarr.
    * navigate from <CONTEXT> to <SCARR> via lead selection
      lo_nd_scarr = wd_context->get_child_node( name = wd_this->wdctx_scarr ).
    CALL METHOD wdevent->get_context_element
        EXPORTING
          name  = 'CONTEXT_ELEMENT'
        RECEIVING
          value = lo_el_scarr.  " getting the clicked line
    CALL METHOD LO_ND_SCARR->SET_LEAD_SELECTION
      EXPORTING
        ELEMENT = lo_el_scarr     " setting the Lead for the cliked button line
    * get all declared attributes
      lo_el_scarr->get_static_attributes(
        IMPORTING
          static_attributes = ls_scarr ).
    Regards
    Chinnaiya P

Maybe you are looking for

  • I can't see my account balance

    Hello: I just got an email telling me that i have an unused itunes balance. I can't seem to get the balance to show up, nor can I figure out how to configure itunes to pay for purchases first with my balance and then with payPal. Any suggestions?

  • Why is my voicemail indicator not working?

    The red circle is no longer displayed when I have new voicemails.  Have tried turning cellular data off and on.  Typically I am in WIFI and don't use cellular data.

  • Will using Myriad Pro help keep filled files small?

    I am a newbie as far as LiveCycle goes and have a problem with a form I created growing to 10 times the intial size because I used our company standard font Century Gothic throughout the document. If I change all the fields to Myriad Pro (the default

  • Database size: optimization: tuning

    Hi: I'm using Berkeley DB as it is supplied with MacOS 10.5.6 on an intel iMac with 2G of ram. On this machine, as well as on a more powerful machine with more memory I see the following: I'm loading a tied hash via Perl BerkeleyDB.pm with constant-l

  • Firefox crashes immediately upon startup

    I have tried reinstalling firefox and also starting it up in safe mode.