Hide table row delete button
I have a table with row 1 visible and row 2 that appears when the "Add a New Row" button is clicked. If the user clicks the "Delete Last Row" button, the last row is deleted. I want the "Delete Last Row" button to only be visible when there is more than one row visible.
This script does not work:
if (Page1.Subform2.Table1._Row2.count =< 1){
this.presence = "visible";
else {
this.presence = "invisible";
Hi,
Is this a code fragment from the click event of the "Delete Last Row" button?, I think you just need to swap the "=<" to "<=", this should have given you a syntax error, or is this just from getting the code into the forum?,
Anyway, try this in the delete button click event;
Page1.Subform2.Table1._Row2.removeInstance(Page1.Subform2.Table1._Row2.count - 1);
if (Page1.Subform2.Table1._Row2.count <= 0)
this.presence = "invisible";
and this in the add button click event;
Page1.Subform2.Table1._Row2.addInstance(true);
if (Page1.Subform2.Table1._Row2.count > 0)
DeleteLastRow.presence = "visible";
Bruce
Similar Messages
-
Hide or remove delete button - ESS personal data iView
Hi, regarding for example ESS(50.4) personal data overview iView.
How to hide or remove delete button in the personal data overview iView screen(I know that this can be done on the ITS server side (web studio), but I want to do this in R3)
/Best Regards
PatrickAchim was right on. Edit/Change the Internet Service in R/3. A few things to consider though....
(1) if using the original service, you may want to create a copy of theme 99 into your own theme (any number will do...99 is just the default theme). If doing so, be sure to change the service's service file (yeh, I always loved that about SAP's naming) to point the ~theme paramter to your new theme.
or
(2) Copy the entire service into your own "Z" service. Then modify the templates as you wish. You will need to point the iView to this "Z" service too.
Also, it is best to do it via SE80 vs. file level because then it will be part of a transport and follow the correct path through the landscape.
Now, if you really want to go back to R/3....find the function module or program the transaction code for your service actually calls, make a "Z" version of it, modify it, create your own "Z" t-code to call it, and THEN modify the internet service's service file (either the original SAP one or a custom version) to call your new "Z" t-code. Lot of work...yes, I know....but that's the way it's done if you gotta get back down to the ABAP level.
Hope this helps!
Message was edited by: Christopher Solomon -
How to hide/remove the 'Delete' button for a particular role
We have a role that can only Create and Edit the Accounts, Contacts, Opportunities, & Leads. So I modified the Default and Owner Access Profiles for that role and changed the Access Level to 'Read/Edit' for each of the above mentioned Record Types.
When the user is logged with this role they can see the 'Delete' button on all the Record Types. When they click on the 'Delete' button they get the 'Access Denied' message. Thats fine, but how do you hide/remove the 'Delete' button for this role so they don't try to click it.At this time it is not possible to hide/remove the "Delete" button. This functionality is on the roadmap.
-
Bizarre Problem for table row deletion.please help
Folks
I am facing a most BIZARRE PROBLEM!!!
I have a table with a deleteButton by the side.
The table has 3 rows
ABC-----DELETE
BCD-----DELETE
VDG-----DELETE
I click on the delete Button of the first row,the record gets deleted from the table,
Now there are 2 records..
BCD-----DELETE
VDG--- -DELETE
I click on the delete Button of the first row,and I get the error
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
The table.getSelectedRow() becomes -1 automatically...
Now if I comment out the Table deletion statements, and I click on any delete Button
i get the correct messages
You clicked row : 1
you clicked row : 2
After deletion of the first record,i am unable to delete the 2nd record,i get the
error above.
any suggestions
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Table Row clicked is : " + table.getSelectedRow());
// Delete row from window.
((DefaultTableModel)table.getModel()).removeRow(table.getSelectedRow());
table.revalidate();
};after deleting the row call this method
fireTableRowsDeleted()
-Ashish -
How to Hide / Disable the delete button in EditForm using Infopath 2010
Dear Experts
In the SharePoint List 2010, need to disable / hide the Delete button while editing the item based on certain condition (based on logged in user)
E.g, if UserA logged then should able to delete the item in EditItem mode
if UserB logged then should not delete the item in EditItem mode
How to achieve this?
Regards
SantoshHi Santosh, it's you again! ;)
I don't think this is possible. You can remove it for all users, but not sure how you could accomplish it just for certain users. See the following link for more info.:
https://social.technet.microsoft.com/Forums/sharepoint/en-US/7a0cecbd-4aba-4fbc-a897-391e0ed4e613/disable-delete-item-option-from-ribbon-and-ecb-menu-even-for-contributors?forum=sharepointgeneralprevious
cameron rautmann -
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 advanceHi 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 -
Deleting rows in a table with a button
Good Day All;
I seemed to have run into a snag with trying to add a delete button in a table that will delete a row. Let me expain.
The form has 1 table that has 7 cells made up of text fields and drop downs. This table is in its own subform.
There is a button to add rows as the user requires. The code I am using to add rows: psl_list_subform.instanceManager.addInstance(1);
I have been asked to add a delete button so a user can delete rows. I have added this to the end of the table. SO each time a row gets repeated, there is a delete button. The code I am “trying” to use is;
Table4.Row1.instanceManager.removeInstance(this.parent.index);
When I click on the button to delete, nothing happens. I brought up the JavaScript debugger, there are no errors.
Any ideas what I missed.
Thanks All
ChompHi,
from my understanding of your form, you adding new instances of the subform "psl_list_subform" which contains a single table row.
The hierarchy that will look like "psl_list_subform.Table4.Row1.RemoveButton".
To remove an instance of the subform, from a button within the table row the script needs to refer to the 3rd parent of the remove button.
this.parent.parent.parent.instanceManager.removeInstance(this.parent.parent.parent.index);
Explaination: this = RemoveButton, 1st parent = Row1, 2nd parent = Table4, 3rd parent = psl_list_subform -
How to delete rows from multiple tables when pressing button
Hi, I'm wondering how do I delete a row from two different tables at the same time when I press the Delete button. Both tables have GROUP_ID as their primary key.
Nevermind! I realized that I had "reset" before my process to delete from the 2nd table.
-
Multi-Row Delete from a table via a button without submitting the page
Hi,
I have a simple page based on a (temporary) table. There is a submit button that calls a PL/SQL process. However, I would like to have an 'Abort' button that deletes all rows from the table belonging to a specific user.
I had a look at 'Processes -> Data Manipulation --> Multi Row Delete' but this can only be linked to a page level event such as onSubmit. My onSubmit is linked to another process so this is not an option for me.
I thought of creating a PL/SQL function for the deletion and calling it from Javascript linked to a button. I have done the PL/SQL and the button but don't know how to call PL/SQL from JS. And is this the correct way of doing something like a deletion? Any documents that show how can this be done will be much appreciated....
I had a look at the forum and the documentation but could not find anything for multil-row deletion triggered from a button.
Your help is appreciated as I'm a newbie :-)
Thanks
AngelaHi,
I actually found the solution. I created a button (that submits) and a computation that calls the PL/SQL function conditional on that button being pressed. Initially I got confused because I already had another PL/SQL function attached to different button. I didn't think that having two buttons that submit the page and call different functions was possible.
Thanks
Angela -
How to add a delete button on each row of the table.
i create a table with a list , and i add a new column.
and then i drag a delete botton from the list operation to the column.
when i create several rows. and click any delete botton of the new created rows. all the new created rows will be deleted.
rows that already exist when the page render are not influenced.and when i click these rows' delete botton,
just the current row will be delete.
that's because when i click the new created rows' delete botton,all the new created botton in this column will automatically be clicked.
i think adf consider all the delete botton are the same one.
is it the table bug? please tell me how to resolve this problem. thanks.
Edited by: 917391 on 2012-3-21 下午6:53
Edited by: 917391 on 2012-3-21 下午10:07
Edited by: 917391 on 2012-3-21 下午10:16i don't use the adf BC, so it is not a VO. it's just a service method that return a list.
and i create the datacontrol and drag it to the page.
Edited by: 917391 on 2012-3-21 下午10:26 -
Digital Signatures and Table Row Add/Delete
I have a table that I want to add or delete rows but one of the cells in the row is a signature field; that column, always has a signature field. In the past, I have noticed that Adobe Livecycle Designer prevents the typical add or delete function (.addinstance(0)) when a digital signature field is present. I was wondering if there is a work around. One thought I had was having say 15 rows but hiding 10 of them. The add button would unhide the hidden rows up to the 15 total rows. The delete button would hide rows down to a min of 5 shown.
I was wondering if anyone know whether or not this would work and what the syntax would be. Also, is anyone aware of other work arounds?
Thanks,
Mallard27Signatures can only be placed on the form statically, so having a repeating (1 to many) dynamic subform with a signature is invalid and is not allowed by designer. I think mostly since a signature field cant be created dynamically, it must exist in the pdf prior to loading.
However, You still can have multiple signatures in a static table as you suggested, making the rows visible/hidden depending on content and cant see why it wont work. But you will need to careful with it. I would presume you will need to make sure you are displaying all rows and then hiding those not in use. Doing the opposite will invalidate signatures. Invisible signatures are not the same as visible signatures and will be invalidated and removed. You should probably only create a new line when needed on a button action, since any hiding will invalidate the previous signatures (since its a form change). You cant lock all fields with multiple signatures and will get errors, so you will have to use form object collections and assign each one to an individual signature ( if fields are involved).
Also, If you are using any LiveCycle server components at all, I'm not sure about the level of support there is for processing multiple signatures. I probably think it would have to be done by a custom component to read the multiple signatures on the submitted xfa data.
There is further background about xfa signatures (a bit older reference) here http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/digisig_ in_XFA.pdf
Sorry, meant to reply to original post. Message was edited by: dohanlon -
Print,Check,Apppend Row,Delete Row,Insert Row buttons actions code
HI,
I have a ALV table in that buttons Print,Check,Apppend Row,Delete Row,Insert Row buttons are there.But client requirement is they don't want those buttons in ALV they want in above the ALV table.
Can you please let me know how to hide those buttons in ALV.and give me code Print,Check,Apppend Row,Delete Row,Insert Row action code..HI,I hope you have instantiated your ALV. Check the below code
* Instantiate the used component " You can use code wizard to get this code.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_usg_alv( ). "usg_alv should be your usage name
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Get Model
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_usg_alv( ).
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model(
* Hide Standard buttons on ALV toolbar
DATA: l_std_func TYPE REF TO if_salv_wd_std_functions.
l_std_func ?= lo_value .
l_std_func->set_edit_append_row_allowed( abap_false ) .
l_std_func->set_sort_headerclick_allowed( abap_true ) .
l_std_func->set_edit_append_row_allowed( abap_false ) .
l_std_func->set_edit_insert_row_allowed( abap_false ) .
l_std_func->set_edit_delete_row_allowed( abap_false ) .
l_std_func->set_view_list_allowed( abap_false ) .
l_std_func->set_sort_headerclick_allowed( abap_false ) .
l_std_func->set_edit_check_available( abap_false ) .
l_std_func->set_pdf_allowed( abap_false ) .
l_std_func->set_export_allowed( abap_true ) .
Radhika. -
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. KimHi 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 -
Table delete button doesn't work with Virtual Forms
I applied all of Winston Prakash's tips to my project table (http://blogs.sun.com/winston/category/Creator), but my table is not the only component in the page, so I had to use Virtual forms.
When I add the "Delete" button, i have to put it on a Virtual Form. I followed the steps on the multi selection table and the "Adding a button panel to the table component header" post, but when I select a row, the JavaScript works well (the row changes to yellow)... but the action code gets a :
getTableRowGroup1().getSelectedRowsCount()==0
and getTableRowGroup1().getSelectedRowKeys().length==0.
I tried almost everything with the forms... I don't know what I missed...It works for me. Is it the Delete button in the Toolbar that doesn't work, or the Delete key in the keyboard, or what? Doesn't any other way of deleting a message work either (e.g. Edit > Delete)?
-
How do I Hide a Row in a Table in a Pages document?
How do I hide a row or column? There is a command to "unhide" but not to hide. Because I cannot hide anything, the unhide command is greyed out - what did Apple do with the Hide Rows command for Tables in Pages? Hide it? lol!
It does not show up in a search of Help - in fact, there isn't even a mention of "unhide" despite there being a command for it!
Why do I want to hide a row? Because if I have an 8 row table in a Pages Template and I only need six of them, deleting the other two breaks all the formulae and inserts #Ref! errors across each formula, rather than automatically altering cell references as other spreadsheets do. In Numbers hiding the cells makes them disappear and does not break the formulae, but this behaviour seems to be missing from Pages.
Or is it me that has missed somethng?I thought that the descriptions given in the Help are clear.
The ADDRESS function constructs a cell address string from separate row, column, and table identifiers.
ADDRESS(row, column, [type], [style], [table])
row: The row number of the address.
column: The column number of the address.
I dropped the comments about type, style and table as I don't use them here.
=IF(ISBLANK(INDIRECT(ADDRESS(ROW(),1))),"",INDIRECT(ADDRESS(ROW(),2))*INDIRECT(A DDRESS(ROW(),3)))
INDIRECT(ADDRESS(ROW(),1))
returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 1st one)
INDIRECT(ADDRESS(ROW(),2))
returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 2nd one)
INDIRECT(ADDRESS(ROW(),3))
returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 3rd one)
In short, when the formula is applied in row 9 it behaves like:
=IF(ISBLANK(A9),"",B9*C9)
The long syntax is required to be able to enter it only once in the header cell as described in the Help and in the PDF User Guide in a chapter entitled "Applying a Formula Once to Cells in a Column or Row".
As we want to use such a formula, it would be odd to destroy its ability using a different formula in a standard bottom row.
More, in a footer row, we may use shorter formulas than in other rows.
In a standard row 10 we would have to write =SUM(D2:D9)
in a footer row we enter only =SUM(D) which add the contents of every standard cells of the column D.
This feature is also described in the named resources.
Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:21:13)
Maybe you are looking for
-
Satellite L750D - BIOS update 2.1 and sound problem
Hello I have little problem. I have been downloaded from your website BIOS 2.1 for Toshiba Satellite L750D (PSK32E). I have been updated BIOS to 2.1 and start problem with sound. When I start game, music or something other only 2 first minutes sound
-
UI API server is unavailable, the installation process will not start!
Hello Experts! SBO VERSION IS: 2007A SP01 PL05 We are trying to install a partner solution's ADDON and we recives Error message: "UI API server is unavailable, the installation process will not start" I have deleted the folder: SM_OBS_DLL from temp f
-
How do you get iMovie to save to another hard drive?
I am trying out the new Imovie and can not figure out how to change Imovie from saving to my SSD/boot drive. I want it to save to my other hard drive. I used the "old" Imove and it was fairly simple. Can this be done?
-
How do I get Itunes to automatically delete nonexistant songs???
How do I get Itunes to automatically delete nonexistant songs??? I am referring to the songs that remain on itunes after you change their name or directory or whatever. It takes too long to delete individual songs. Is there some sort of plug-in avail
-
I own CS6 and it keeps asking for activation - won't except serial number - how to fix
Keep getting message "contact support" and I own the products installed. Very frustrating. Is there a quick way to chat with a rep?