Is it possible that a particular row of IWDTable set to non editable?
Hi All,
Is it possible that a particular row of IWDTable set to non editable on the basis of a field value ?? Plz help.
Context
+ Rows (node)
+ value (integer)
+ readOnly (boolean,calculated=true)
Bind the "readOnly" property of the InputField (cell editor) to the "readOnly" attribute shown above. Implement the calculated attribute getter like
boolean getRowsReadOnly(IRowsElement element)
return element.getValue() == 42; /* or whatever */
Armin
Similar Messages
-
Capture grid row value and set it in edit box
hello expert
i want to select the perticular colum of grid and capture the three colum value of grid in three edit box on the form pls help me sir
thanx a lotHi vmaskey,
Use the Grid's DataTable GetValue method to get the values you need.
Do this on the ItemPressed Item event, when the user selects a row
Dim Value1 As String = oGrid.DataTable.GetValue(0, oGrid.GetDataTableRowIndex(oGrid.Rows.SelectedRows.Item(i, BoOrderType.ot_RowOrder)))
Regards,
Vítor Vieira -
Delete particular row with routine
Hi,
I have a report that the customer required that a particular row be deleted from the cube.
I have done the coding in start routine but the requirement is not meant
Data in report
DOC Num Flag Amount
001 # 100
002 X 200
002 # 200
003 X 500
003 # 500
004 # 300
Now the requirement is that since doc num 002 and 003 have 2 rows because of the flag, The # should be deleted while 001 and 004 should be kept.
I used Delete SOURCE_PACKAGE WHERE FLAG = ' ' in end routine but it didn't work as 001 and 004 were deleted from the report where as they should show.
how do I resolve this code
thanksHello,
Try the following code in the start routine:
data: itab_SP_1 type SOURCE_PACKAGE,
itab_SP_2 type SOURCE_PACKAGE.
wa_SOURCE_PACKAGE like line of SOURCE_PACKAGE,
itab_SP_1 = SOURCE_PACKAGE.
Delete itab_SP_1 WHERE FLAG = ' '.
itab_SP_2 = itab_SP_1.
loop at SOURCE_PACKAGE into wa_SOURCE_PACKAGE.
read table itab_SP_1 with key doc_co = wa_SOURCE_PACKAGE-doc_no.
if sy-subrc NE 0.
append wa_SOURCE_PACKAGE to itab_SP_2.
endif.
endloop.
clear SOURCE_PACKAGE.
append line of itab_SP_2 to SOURCE_PACAKGE.
Regards,
Shashank -
Setting Non-Editable property for selected Rows in jTable
Hi,
I want particular rows to be set non-editable within a jTable. For example. If I have seven rows as follows:
1
2 - (Non-editable)
3
4
5 - (Non-editable)
6
7
I want to set non-Editable property to the second & Fifth Rows(say) alone. Other Rows, I may edit.
How can I do this?
Thanks in adv.TableModel has method
boolean isCellEditable(int rowIndex,
int columnIndex)
so you need to make your table model return false for these rows. -
Hi experts..
i got one requirement like i need to edit some rows particularly in alv....
Edit in alv output....is it possible to get that .....using normal function module with out using oops concept...
could any one pls help me...Hi Pendurti ,
If you want a particular field to be editable , simply define the fieldcatalog as
wa_fieldcatalog-edit = 'X'.
wa_fieldcatalog-input = 'X'.
for that field.
and
Now when you use FM ' Reuse alv grid display '
define USER_COMMAND
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = int_fieldcatalog
is_layout = wa_layout
TABLES
t_outtab = t_disp.
and now in form USER_COMMAND ; code as per following
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref1.
CALL METHOD ref1->check_changed_data.
endform.
Regards,
Yogendra Bhaskar -
Particular row readonly based on the condition.
hi experts,
am using jdev 11.1.15.0 using adf bc.
my need.
i had af:table in that.
column1 | column 2 | colun3 column n
data1 | data2 | E entry complete button
data3 | data4 | E entry complete button
if i press button that it will change database value "E" to "N"
eg:
column1 | column 2 | colun3 column n
data1 | data2 | N entry complete button while change into N partcular row get into read only. i dono want change this particular row.
data3 | data4 | E entry complete button this row must be editable.
whenver it change "E" into "N" the particular row get read only mode.
how can i achieve my task.
i hope u all understud.sures/ jabr both ideas is useful for me. but am trying this way.
i have a code in my bean. like this.
public String cb23_action2() {
// Add event code here...
BindingContainer bindings = getBindings();
DCIteratorBinding dciter =(DCIteratorBinding) bindings.get("GlLvlAccounts1Iterator");
Row row=dciter.getCurrentRow();
row.setAttribute("GlalStatus", "N");
System.out.println("Document Entry completed "+row.getAttribute("GlalStatus"));
if (row.getAttribute("GlalStatus") == "N") {
// here i want to use the use iteararotr.
// and make the that current row readonly .
.// is it possible here. some thing i tried. i cant't
OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
Object result1 = operationBinding1.execute();
return null;
Edited by: Erp on Oct 15, 2011 8:17 AM -
How to color a particular row in a matrix
Hi All,
Using SBO, i am having two queries:
1. Is it possible to color single row, Cell in a matrix or a grid by any way.
2. And How to copy particular row from 1 matrix to another?. I want this by using drag n drop event of mouse. Only click and right click mouse events are available in SBO. But I want to use mouse down and mouse up events..Please help me, it's urgent.
Thanks in advance.Hi,
1) No, unfortunately, you cannot colour either a row or a single cell in the current versions of the matrix and grid controls. As a workaround, I use an image column as the first column in my matrices and then put coloured squares in this column for rows that I want to 'highlight'.
2) You can't drag and drop using the SBO controls. Personally, I use the right-click event and add a menu option to copy the selected rows to the other matrix and it works fine. Click is the Mouse Down event and Item Pressed is the Mouse Up but it is not fully supported on matrices or grids.
Kind Regards,
Owen -
Changing font size(bold) or color of a particular row in ALV Grid Digplay
Hi Experts ,
I am having a requirment to highlight some particular rows in ALV Grid Display . To achieve this i need to change font size or make it bold or change color of that row .
Please give me some inputs .
Thanks in Advance.
VijyetaHi
Coloring An Entire Row
Coloring a row is a bit (really a bit) more complicated. , you should add an additional field to your list data table. It should be of character type and length at least 4. This field will contain the color code for the row.
First you have to declaration of our list data table u201Cgt_listu201D.
DATA BEGIN OF gt_list OCCURS 0 .
INCLUDE STRUCTURE SFLIGHT .
DATA rowcolor(4) TYPE c .
DATA END OF gt_list .
Adding the field that will contain row color data
As you guess, you should fill the color code to this field. But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing the name of the field containing color codes to the field u201CINFO_FNAMEu201D of the layout structure.
e.g.
ps_layout-info_fname = <field_name_containing_color_codes>. u201Ce.g. u2018ROWCOLORu2019
You can fill that field anytime during execution. But, of course, due to the flow logic of screens, it will be reflected to your list display as soon as an ALV refresh occurs.
Try this link also:
Possible functionalities in ALV
Regards
Neha -
Locking a particular row in a table control
Hi All,
I have module pool program in which table control is used. I would like to know whether it is possible to lock a particular row in the table so that another person will not be able to edit it until the first user completes his work. It should be only for that particular record which is being currently edited in the table.Hi,
Yes you can lock particular row in a table control..
In the flow logic..
PROCESS BEFORE OUTPUT.
LOOP AT itab INTO wa WITH CONTROL tc.
MODULE disable_row.
ENDLOOP.
MODULE disable_row.
* call the Enqueue function module..If the
IF sy-subrc NE 0.
LOOP AT screen.
SCREEN-INPUT = 0. " Disable for input
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE.
Thanks
Naren -
How to set fire action event for particular rows in a table
HI All,
I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
The table has columns like fullname,employee id etc.
So i want to set fire action event for particulars rows only which will saisfy some condition.Atanu,
Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
In either case loop through the rows and when your condition is met write the action to be performed in controller.
Regards,
Anand -
How to delete a particular row in ALV table
Hi,
How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
Thanks
Bala DuvvuriHello Bala,
Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
data : lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_table_settings ?= lr_config.
** Setting the ALV selection to multiple selection with no lead selection
lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
Next delete the selected rows in the action triggered by the button:
METHOD onactiondelete_rows .
DATA: wd_node TYPE REF TO if_wd_context_node,
lt_node1 TYPE ig_componentcontroller=>elements_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set,
row_number TYPE i VALUE 0.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP.
CALL METHOD wd_node->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_node1.
wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
Regards,
Uday -
How to get handle to a MST bean for a particular row in an advanced table
Hi
Requirement:
My advanced table has 2 columns, the 1st one has a LOV and the 2nd one is a switcher which toggles from LOV to MST depending on the value in the 1st column.
Implementation Steps:
1) Trap LOV event in 1st column and pass row index to the AM
2) Get the VO row from the row index (EVENT_SOURCE_ROW_REFERENCE), set the switcher attribute to MST/LOV depending on Business Logic
3) Get the view attribute value of the 2nd column (to which LOV/MST is mapped).
My LOV/MST gets rendered correctly on the page. However, when the LOV renders in the 2nd column, the view attribute is correctly populated in the LOV. But the MST renders with no value.
I understand that the MST loses value on form submission and that this value needs to be set in the PR of the CO. For that how do I get a handle to the MST bean of the particular row?
This is urgent!!
Thanks
RituPointers?
Anyway I can make the MST in the row return the correct view attribute? -
Change the color of a particular row in a jtable
I have a jtable and i want to change the color of one particular column and few rows to blue and underline the text depending on some condition. In my view class if a condition is true
for( count=0;count<grdTest.getRowcount;count++)
if(some condition true)
grdTest.getColumnModel().getColumn(0).
setCellRenderer(new MyTestCellRenderer(count));
And my cell renderer
public class MyTestCellRenderer extends DefaultTableCellRenderer {
int rowIndex=-1;
public MyTestCellRenderer(int rowcount) {
super();
rowIndex=rowcount;
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value,
isSelected, hasFocus, row, column);
if(row == rowIndex)
setText("<html> <u> <font color='blue'>" + value.toString());
return this;
This is behaving very wierd . If suppose there are 50 rows and all of them have the condition true then only the last one in the row color is changes.
However if only one out othe say10 has the condition true then it changes the color and underlines the particular row,column.
Is there any other way to do this or what i am doing wrong
Thanksif(row == rowIndex)Your code is a shambles because of the lack of tags, but I don't believe I see anything being called when this boolean condition is not true. That would be a problem.
-
Is it possible to switch the rows and columns?
Is it possible to switch the rows and columns of a table? The reason I ask is that it would be easier for me to input the data with the number at the top of a column and the fields going down. But it would be easier to read the data with the number on the left and the fields going to the right. Is it possible to switch a table in this way?
mahongue wrote:
Is it possible to switch the rows and columns of a table? The reason I ask is
that it would be easier for me to input the data with the number at the top
of a column and the fields going down. But it would be easier to read the
data with the number on the left and the fields going to the right. Is it
possible to switch a table in this way?
It sounds to me as though you wish to transpose a table so that the original is changed from rows to columns and from columns to rows, as in the following:
Table 1
A B C
========
1 o p q
2 r s t
3 u v w
Table 2
A B C
========
1 o r u
2 p s v
3 q t w
You are right - it would be nice to have a menu item to magically transpose a selected block of cells. But there isn't one. So...
One way to solve this is to use the index() and transpose() functions to accomplish row and column cell transposition. If you are going to use a 1:1 cell correspondence and change the header columns and rows also, you can use this:
=INDEX(TRANSPOSE(Table # :: <range>),ROW(),COLUMN())
where Table # and <range> is substituted as in the following fashion:
=INDEX(TRANSPOSE(Table 1 :: $A$1:$C$3),ROW(),COLUMN())
Create a second table. Copy the modified formula above with the appropriate substitutions, select the range you wish to have your transposition inserted into (must match the transposed cell dimensions of the original range), paste the forumula and voila! the cells will be transposed.
Cautions:
o The target table must match the swapped cell length and width dimension. For example, if the original data range is 6 columns wide by 4 rows deep, then the corresponding table or range to hold the transposition must be 4 columns wide by 6 rows deep.
o If your transposed data block is to be offset from the origin of the new table, then you will need to include a subtractive offset into your cell formula, since in the transpose() function the data in the master data range is referenced from its position with the master range, not its cell position in the table. Such an offset is necessary because this example formula uses the target row and column numbers to arrive at indexed positions.
For example, if the new data range is to be offset one column to the right and one row below from the target table's origin then you must subtract (-1) from the cell and from the column references in the formula:
Example:
=INDEX(TRANSPOSE(Table 3 :: $B$2:$D$4),ROW()-1,COLUMN()-1)
If someone has a better solution I'd be glad to hear of it. -
XML DB: is it possible to get a row for each element in a container element?
I have an XML document containing a container element (collection). If I query, using an XPath expression, the contained elements I get a row for each container element with the contained element concatenated. Is it possible to get a row for each contained element?
I run this simple query:
select extract(xmltype('<colors><color>Red</color><color>Green</color></colors>')
, '/colors/color/text()').getstringval() from dual
And get this result:
EXTRACT(XMLTYPE('<COLORS><COLOR>RED</COLOR><COLOR>GREEN</COLOR></COLORS>'),'/COL
RedGreen
1 row selected.
What I would like to have is:
Red
Green
2 rows selected.
Wishful thinking or possible? Many thanks!Sure. This is where our XMLSequence() function comes in. It allows you to treat the top-level nodes in a nodeset as if they were rows in a table when combined with the TABLE() operator. Here's an example.
First, to make the SQL look a little cleaner, I like to define a function like this:
create or replace function testdoc return xmltype as
begin
return xmltype('<colors><color>Red</color><color>Green</color></colors>');
end;.
To break out the nodeset of <color> elements as a table, we use the following query:
select value(list_of_color_elements).extract('*/text()').getStringVal() as color
from TABLE( XMLSequence( extract(testdoc(),'/colors/color'))) list_of_color_elements.
Or, using the new-in-9.2 extractValue() operator so we don't have to remember the text() part:
select extractValue( value(list_of_color_elements), '.') as color
from TABLE( XMLSequence( extract( testdoc() ,'/colors/color'))) list_of_color_elements.
Here the TABLE(XMLSequence(...)) combo produces a table of XMLType, with one XMLType object in each row of the table.
In general, if the XMLType instance were coming from an XMLType table xmltab the query would look like this:
select extractValue( value(colors), '.') as color
from xmltab x, /* Important that this table comes earlier in the FROM clause! */
TABLE( XMLSequence( extract( value(x),'/colors/color'))) colors.
And if the XMLType were instead in a column of XMLType named doc in a table xmltab, then we would have the syntax:
select extractValue( value(colors), '.') as color
from xmltab x, /* Important that this table comes earlier in the FROM clause! */
TABLE( XMLSequence( extract( x.doc ,'/colors/color'))) colorsOnce you get the hang of it, you'll see that the combination of TABLE(XMLSequence()) to "shred" XML nodes into rows, and XMLAgg() to aggregate fragments of XML across multiple rows back into a single document, is quite powerful.
Maybe you are looking for
-
Hi all, We have a table like this: create table tblSales (sku varchar2(100), selling_date date, sales_vol integer );Records in this table will be like this: SKU1 15-JUL-07 300 SKU2 15-JUL-07 400 SKU3 15-
-
Is there any way to remove "stitching" in Illustrator at all?
I've encountered a very common problem with thin white lines appearing in some of my vector imagery in Illustrator CS5.5. Like with most stitching errors, I get this when using shapes with gradient transparency. There's also some shape distortion hap
-
No video working in any browser
The videos were working fine two days before but now, I can't watch any video. I have tried everything - uninstalling and reinstalling flash, disabling hardware accelerator, deleting flash cache, restoring my laptop to previous points, installing var
-
can I use iTunes in cloud computing from public library computers? Can I subscribe to a external database that will let me us apple software from public compute?r--more often than not a PC.
-
Illustrator cs4: Van decal stickers, that's whats needed!
Hi I'm looking to make some grapics for a van. Sizes need to be quite large around 4ft x 1ft Heigh Illustrator cs4 is the programme or poss PS cs4 What i need to know is how do i set the page up? After i finished the design i wish to send to digital