How to select multiple row of table using check box?
hi,
i am having table on view having first field as checkbox. what i want, when i click on checkboxes in multiple rows, and i click on any button i need to use those content to next view...
my problem is if i select only one row , i can use onlead select property of table..but when i select multiple rows through check box how should i read contents of table....?
Plz solve it.
Thanks,
Saurin Shah
Hello Saurin,
You are right using LeadSelection you can select only 1 row at a time. You will have to make use of Selection for achieving this. First you will have to change the selection mode of the table to multiple & also change the selection property for the related context to 0..n . Please find a code extract which might help you. (However this facility is only available from SP 14.) The main part is using the set_selected method of if_wd_context_node.
data: node_zcourse_details type ref to if_wd_context_node,
node_course_assign type ref to if_wd_context_node,
elem_course_assign type ref to if_wd_context_element,
stru_course_assign type if_v_details=>element_course_assign ,
item_popin_selected like stru_course_assign-popin_selected.
" navigate from <CONTEXT> to <ZCOURSE_DETAILS> via lead selection
node_zcourse_details = wd_context->get_child_node( name = if_v_details=>wdctx_zcourse_details ).
" navigate from <ZCOURSE_DETAILS> to <COURSE_ASSIGN> via lead selection
node_course_assign = node_zcourse_details->get_child_node( name = if_v_details=>wdctx_course_assign ).
" @TODO handle not set lead selection
if ( node_course_assign is initial ).
exit.
endif.
data elem_set type wdr_context_element_set.
field-symbols <wa_elem> like line of elem_set.
elem_set = node_course_assign->get_elements( ).
loop at elem_set assigning <wa_elem>.
<wa_elem>->set_selected( TRUE OR FALSE ). " Supply either TRUE/FALSE in here
endloop.
Similar Messages
-
How i can Insert selected records in database table using check box.
Hi Friends,
I have non database block, which displayed multiple records, now I add a Check Box to this block and now I want to insert the records in a database table which I checked. So when I press a button, all the checked records are inserted in the table.
Please send me the code of this solution.
Thanks in advance.
ShahzadI have almost the exact scenario but instead of inserting into the DB, I want to find the Checked records and process them in PL/SQL script.
I currently have a cursor that looks for all the checked records. It's only getting the first record, so I figured I need to loop through the block looking for checked records.
Also can I save them to a temp or PL/SQL table to process later? -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M. -
How to select data from a table using a date field in the where condition?
How to select data from a table using a date field in the where condition?
For eg:
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = '31129999'.
thanks.Hi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
How to select a row in datagrid by checking the check box in that row
how to select a row in datagrid by checking the check box in that row.
Im using <html:checkbox> tag, and also a VO which is in request scope. i wanna display the values in the VO in a row and corresponding to this i want a checkbox..
Thanx in advance
Message was edited by: me
Hemanth@SA
Message was edited by:
Hemanth@SAHello,
I got the solution:
final int pRow = row;
final int pCol = column;
final JTable myTable = mytable;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
myTable.requestFocusInWindow();
myTable.changeSelection(pRow, pCol, true, true); -
How to select multiple rows from List Of Values
Hello,
I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't.
so how i can select many rows to set them in my adf table.
Thank in advanceHi,
LOV is map to an attribute in the viewObject so it will return only one value or more values from selected row. You can't select multiple rows from LOV.
But you can do this by using popup which you can select multiple rows and insert the selected rows to another table.
This blog post explain how to achieve this :
http://husaindalal.blogspot.com/2009/11/search-from-popup-and-add-to-new-table.html#comments
Sameh Nassar -
How to select perticular row in table control for BDC
Hi all
I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
Please Suggest me. it urgent.
Thanks& Regards,
RPHi all
I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
Please Suggest me. it urgent.
Thanks& Regards,
RP -
How to get selected row values in a table using check box
Hi ADF Experts,
JDEV Version 11.1.1.7.0
My requirement is getting the selected row valuesof a af:table using a checkbox(multi select).
Thanks,
AnimeshHi,
add a transient attribute to the POJO entity and update this through a check box. The ensure you have autosubmit=true set on the check box. In a value change listener set or remove the row's checbox attribute value
Frank -
How can we select multiple rows in table control for module pool program?
hi guru's
i cannt able to select multiple table control rows for deletion of records please give any code to select rows?
regrards,
satheesh.On the Table Control attributes there is a "Selectability" option where you choose one of: None, Single, or Multiple. In your code you then need to pick up which rows have the selection column set to 'X'.
-
How can I update multiple rows in table using a single form button and checkboxes
I have a project where the visitors can select multiple productos and once the click on the PURCHAS button it updates the selected records.
You have not mentioned the programming language that you are using, but here's a link that could help you if you are using ASP.
http://csharpdotnetfreak.blogspot.com/2009/05/edit-multiple-records-gridview-checkbox.html
Also, have a look at this discussion thread
http://forums.asp.net/t/1470882.aspx -
How to remove multiple rows from table
Hi All,
in my application iam using two tables,
this is my code
int selection = wdContext.nodeA().getLeadSelection();
String num = wdContext.nodeA.geAAt(selection).getV_Num();
for(int b=0;b<wdContext.nodeVn_Context().size();b++)
if(wdContext.nodeVn_Context().getVn_ContextElementAt(b).getVa_num().equalsIgnoreCase
(num))
wdContext.nodeVn_Context().removeElement(wdContext.nodeVn_Context().getVn_ContextElementAt(b));
here Vn_Context is having 4 rows, i mean size of Vn_Context is 4. when i use this code to remove that 4 rows based on the condition, which i gave in if, its able to remove only one row, so how to remove those four rows, is this code correct or not, please help me.Hi sushma,
if you have 4 row then why should you give the condition for removing rrow..because when you gave condition the depends on your lead selection of getVa_num().so you will return perticullar row of getVa_num(). value of lad selection ..this would not match of other row value(getVa_num().so it will remove only that value of lead selection of getVa_num().
better you remove taht condition.
int selection = wdContext.nodeA().getLeadSelection();
String num = wdContext.nodeA.geAAt(selection).getV_Num();
for(int b=0;b<wdContext.nodeVn_Context().size();b++)
//if(wdContext.nodeVn_Context().getVn_ContextElementAt(b).getVa_num().equalsIgnoreCase
//(num))
wdContext.nodeVn_Context().removeElement(wdContext.nodeVn_Context().getVn_ContextElementAt(b));
no need to give the condition right now..
if you want to remove multiselection row,i mean selected row for multiple then you select the row as per your rows delete.
for(int b=0;b<wdContext.nodeVn_Context().size();b++)
if(lead==b || wdcontext.nodeVn_Context().isMultiselection(b){
wdContext.nodeVn_Context().removeElement(wdContext.nodeVn_Context().getVn_ContextElementAt(b));
this way you do solve your problem..
thanks
jjati -
Trouble updating multiple rows in table using subquery
Hi everyone, I'm having trouble updating multiple rows with a subquery. Here's the setup:
create table mytable (
col_a number primary key,
col_b number,
col_c number,
col_d number);
insert into mytable values (1 ,1,1,15);
insert into mytable values (2 ,1,2,7 );
insert into mytable values (3 ,1,3,11);
insert into mytable values (4 ,1,4,23);
insert into mytable values (5 ,1,5,14);
insert into mytable values (6 ,2,1,50);
insert into mytable values (7 ,2,2,41);
insert into mytable values (8 ,2,3,13);
insert into mytable values (9 ,2,4,12);
insert into mytable values (10,2,5,19);
insert into mytable values (11,3,1,10);
insert into mytable values (12,3,2,92);
insert into mytable values (13,3,3,81);
insert into mytable values (14,3,4,17);
insert into mytable values (15,3,5,66);
insert into mytable values (16,4,1,54);
insert into mytable values (17,4,2,41);
insert into mytable values (18,4,3,22);
insert into mytable values (19,4,4,24);
insert into mytable values (20,4,5,17);For this example, using an update statement (or merge if that's better), say I want to set the values for col_d where col_b = 3 equal to the values for col_d where col_b = 1 and col_c equal each other. Results should look like the following after the update:
col_a col_b col_c col_d
1 1 1 15
2 1 2 7
3 1 3 11
4 1 4 23
5 1 5 14
6 2 1 50
7 2 2 41
8 2 3 13
9 2 4 12
10 2 5 19
11 3 1 15
12 3 2 7
13 3 3 11
14 3 4 23
15 3 5 14
16 4 1 54
17 4 2 41
18 4 3 22
19 4 4 24
20 4 5 17I can see it right there at my fingertips using this query, where I want to set b_col_d = a_col_d, but I'm missing something, as this query returns too many rows when used in the update statement.
select * from (
select col_a as a_col_a, col_b as a_col_b, col_c as a_col_c, col_d as a_col_d
from mytable
where col_b = 1
) a, (
select col_a as b_col_a, col_b as b_col_b, col_c as b_col_c, col_d as b_col_d
from mytable
where col_b = 3
) b
where a.a_col_c = b.b_col_cupdate mytable set column_d = (select ??? where exists ???)
Can someone help me get there? I'm using 10GR2.
Thanks!
MarkHopefully this is what you are looking for:
SQL > UPDATE mytable myt1
2 SET col_d = ( SELECT myt2.col_d
3 FROM mytable myt2
4 WHERE myt2.col_b = 1
5 AND myt1.col_c = myt2.col_c
6 )
7 WHERE col_b = 3
8 AND EXISTS
9 ( SELECT NULL
10 FROM mytable myt2
11 WHERE myt2.col_c = myt1.col_c
12 )
13 ;
5 rows updated.
SQL > SELECT * FROM mytable ORDER BY col_a;
COL_A COL_B COL_C COL_D
1 1 1 15
2 1 2 7
3 1 3 11
4 1 4 23
5 1 5 14
6 2 1 50
7 2 2 41
8 2 3 13
9 2 4 12
10 2 5 19
11 3 1 15
12 3 2 7
13 3 3 11
14 3 4 23
15 3 5 14
16 4 1 54
17 4 2 41
18 4 3 22
19 4 4 24
20 4 5 17
20 rows selected.Thank you so much for providing the sample data in an easy to consume form, as well as the expected output. -
How to Select Data from different Tables Using Linq
Hi,
I have two different tables, I just want to collect data from tables using Linq to SQL Queries.
The tables looks like This
ID Name ImageUrl
Other Table is
ID EmpID CheckInTime CheckOutTime
What I want to Collect data from CheckInTime and want to place it in a that is in a list view
Same thing I want to do it for CheckOutTime And One thing I want to tell is both tables are joined by a FK EmpID with ID.
What Are the suggestions for me
I have Used this code
var data = from emp in db.Employees
join chk in db.CheckInCheckOuts on emp.ID equals chk.EmpID
select new EmployeeCheckInOut
Name = emp.Name,
ImageUrl = emp.ImageUrl,
CheckIn = emp.CheckInCheckOuts,
CheckOut = emp.CheckInCheckOuts
Here the CheckInCheckOuts is another table, I don't how do I access fields of the Other table "CheckInCheckOuts"
Thank you
AliMitja,
Kind of Tables, I don't Know but I can Tell you that these are Two table, first Table Have Data in It, Name, ImageUrl I have filled this table with names and ImageUrls And are string type.Other Table is for the CheckInTime And CheckOutTime of the employee.
What I need that when I click on the Image button it Should displays The Current Datetime into the label below the Image button.
So I have Problem accessing my CheckInCheckOut Table because I may not have Idea about.Did you understand what I need to do, if you have more question please ask to me.
Thanks
Ali -
Update multiple rows in table using ODataModel.
I have tied ODataModel with table using "TwoWay" binding. I need to allow user to edit the rows of the table at the bottom of which I have 'Save' button. Currently though the table is editable I am unable to edit the entries in multiple rows of the table.
Please find my code below:
var oTable = new sap.ui.table.Table("dprTable",{
visibleRowCount: 4,
visible: true,
navigationMode: sap.ui.table.NavigationMode.Paginator
var oColumn = new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "DBR/DPR"}),
template: new sap.m.Link({
"target": "_blank",
press:[controller.onClickDemoNo,controller]
}).bindProperty("text","DemoId"),
width: "auto",
tooltip: "DBR/DPR"
oTable.addColumn(oColumn);
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Description"}),
template: new sap.ui.commons.TextView().bindProperty("text", "DemoDesc"),
width: "auto",
tooltip: "Description"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Required Date"}),
template: new sap.ui.commons.DatePicker("",{
value:{
path:"ReqDate",
type: new sap.ui.model.type.Date({pattern: "dd-MM-yyyy"})
change: function(){
console.log('the date is changed and it\'s value is'+value);
width: "auto",
tooltip: "Required Date"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Requestor"}),
template: new sap.ui.commons.TextView().bindProperty("text", "RequestorName"),
width: "auto",
tooltip: "Requestor"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Requestor/Project Lead"}),
template: new sap.ui.commons.TextView().bindProperty("text", "LeadName"),
width: "auto",
tooltip: "Requestor/Project Lead"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Solution"}),
template: new sap.ui.commons.TextView().bindProperty("text", "SolutionText"),
width: "auto",
tooltip: "Solution"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Start Date"}),
template: new sap.ui.commons.DatePicker("",{
value:{
path:"StartDate",
type: new sap.ui.model.type.Date({pattern: "dd-MM-yyyy"})
width: "auto",
tooltip: "Start Date"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "End Date"}),
template: new sap.ui.commons.DatePicker("",{
value:{
path:"StartDate",
type: new sap.ui.model.type.Date({pattern: "dd-MM-yyyy"})
width: "auto",
tooltip: "End Date"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Estimated Duration"}),
template: new sap.ui.commons.TextView().bindProperty("text", "EstDuration"),
width: "auto",
tooltip: "Estimated Duration"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Hours"}),
template: new sap.m.Input("",{}).bindProperty("value", "ActDuration"),
width: "auto",
tooltip: "Hours"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Status"}),
template: new sap.ui.commons.ComboBox({items: [
new sap.ui.core.ListItem({text: "New",key:"1"}),
new sap.ui.core.ListItem({text: "In Process",key:"2"}),
new sap.ui.core.ListItem({text: "Completed",key:"3"})
]}).bindProperty("value","StatusText"),
width: "auto",
tooltip: "Status"
oTable.setBusyIndicatorDelay(1);
//oData service call
var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZSECENTRAL_SRV",true);
oModel.setDefaultBindingMode("TwoWay");
oModel.attachRequestSent(function (oEvent) {
console.log('request sent');
oTable.setBusy(true);
oModel.attachRequestCompleted(function () {
console.log('request completed');
oTable.setBusy(false);
});os
oModel.attachRequestFailed(function () {
oTable.setBusy(false);
oTable.setModel(oModel);
oTable.bindRows("/DEOPENDBRSet");
Is there something pending in the settings? And to update the multiple records in the table do I have to make use of some batch operations? Any help would be appreciated.
Thanks,
Supriya KaleHi Supriya,
your code is missing call of oModel.submitChanges() when Save button is called.
You can find the example here SAPUI5 SDK - Demo Kit
Regards,
Peter -
How to select all rows in table automatically after refreshing?
Hi,All
After refreshing the table,I want to select all rows,like MultipleButton's function.
How can I do?
Thanks
Smile.Hi,-Grif-
* Set the selected state for the given row groups
* displayed in the table. This functionality requires
* the 'selectId' of the tableColumn to be set.
* @param rowGroupId HTML element id of the tableRowGroup component
* @param selected Flag indicating whether components should be selected
function selectGroupRows(rowGroupId, selected) {
var table = document.getElementById("form1:table1");
table.selectGroupRows(rowGroupId, selected);
}I don't know that the parameter selected is a boolean,or the checkbox(radio button) id?
Thanks
Smile
Maybe you are looking for
-
How to split a string into tokens and iterate through the tokens
Guys, I want to split a string like 'Value1#Value2' using the delimiter #. I want the tokens to be populated in a array-like (or any other convenient structure) so that I can iterate through them in a stored procedure. (and not just print them out) I
-
Remove padding on menu bar and toolbar
Hi, Is there a way of removing the extra margin at the bottom of JMenus and JToolBars? I've highlighted the margins in red so you can see them better: http://img410.imageshack.us/my.php?image=paddingapp4rm.png Also, it it possible to remove the drag
-
Managing ACLs (7600, CRS IOS-XR, GSR) – advise on automation tools for SP
/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm
-
You can't use this version of application "After Effects"
I have the Adobe CS6 installed on my computer and they all worked fine with Snow leopard, but the moment I got Yosemite and tried to open After Effects I get this message: "You can't use this version of the application "Adobe After Effects CS6" with
-
How i can got my facetime in my ipad air pls help me
pls help me i can got my face time in my ipad air 128g wifi+cell