Use ItemRenderer for particular rows in ADG
I noticed that the itemRenderer is applied column-wise. I was wondering if it is possible to use ItemRenderer only for a few rows in the ADG. I want the itemRenderer to be applied to parent nodes and all their children. But if a row doesn't have children, I don't want it to be renderer by an ItemRenderer. Any idea of how to achieve that? Thanks.
Yes. You'll need to use the ADG's rendererProviders property. It's an array of AdvancedDataGridRendererProviders (http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridClasses/AdvancedDataG ridRendererProvider.html). The documentation is pretty good, but basically you set a bunch of properties on each ADGRP, and the grid figures out from those properties what renderers to use on the fly. Its exactly what you need for different renderers at different levels in a hierarchy.
Similar Messages
-
Checkboxes only for particular rows.
Hi frends..
Here my requirement can we keep checkboxes only for particular in the alv using oops..
I need to display a report showing first column as checkbox.But I need to display checkbox only
for particular rows which satifies the condition.
pls reply me
ThanksHi,
Refer these threads for editing fields for certain rows only:-
Re: Making selected alv rows editable
Re: selective edit in ALV grid
Locking Row in ALV
And refer this wiki for code for using checkbox with alv grid:-
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
Edited by: Tarun Gambhir on Feb 10, 2009 10:31 AM -
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 diasble selection for particular rows in a Table?
im currently working on a multiple select table.. i need to disable the checkbox for some particular rows. How can i get runtime control over that cell??
To disable one or more rows of single or multiple selection in your table, add the following code to your controller processRequest method:
OATableBean tableBean = ...;
tableBean.setSelectionDisabledBindingAttr("Disabled");
In the example above, "Disabled" represents the Boolean view attribute that returns 1/"Y" if one or more rows is (are) to be disabled, otherwise it returns 0/"N". The view attribute "Disabled" must belong to the same view object as the one associated with the table items.
If its an advanced table, use the same method on OAAdvancedTableBean instead. -
How to use simple values services for multiple rows ina table
Hi Frnds...
As per my requirment i need to use SVS for multile rows in a table.
The coding goes like this for getting single attribute which is directly under root context.
objSimpleValueSetCurr = wdContext.getNodeInfo().getAttribute("ctx_attribute");
(this is only for context attribute directly placed under root context in the view controller.)
We need to use value node and a value attribute inside this node. And retrieve the same. so need help regarding the code changes.
Regards,
SudeepHi ,
I had tried out your suggestion. Its not working.
The code goes like this, but the data is not getting populated.
"controller_curr" is the value attribute under the node "InitTable" in the controller which is further mapped to view controller with the same structure.
The data is geting printed through the message manager just before the line
divSMT.put(currency,currency); in this code, at the end.
But "divSMT.put" is not able to populate the data.
_________START________
public void currency( )
//@@begin currency()
IWDMessageManager msg = wdComponentAPI.getMessageManager();
ISimpleTypeModifiable objSimpleTypeCurr = null;
IModifiableSimpleValueSet objSimpleValueSetCurr = null;
String currency=null;
String bandg = null;
Z_Bapi_Get_Curr_Rate_Input authCurrDet = null; //for FCURR
Try
authCurrDet = new Z_Bapi_Get_Curr_Rate_Input();
wdContext.nodeZ_Bapi_Get_Curr_Rate_Input().bind(authCurrDet);
wdContext.nodeZ_Bapi_Get_Curr_Rate_Input().currentZ_Bapi_Get_Curr_Rate_InputElement().modelObject().execute();
IWDAttributeInfo objSimpleValueSetCurr1 = wdContext.nodeInitTable().getNodeInfo().getAttribute("controller_curr");
ISimpleTypeModifiable countryType = objSimpleValueSetCurr1.getModifiableSimpleType();
IModifiableSimpleValueSet divSMT = countryType.getSVServices().getModifiableSimpleValueSet();
int sizeofCurrencyFCURR = wdContext.nodeOPCURROutput().nodeIt_Curr_Rate().size();
msg.reportSuccess("SizeofCurrency FCURR : "+sizeofCurrencyFCURR);
for(int i=0;i<sizeofCurrencyFCURR;i++)
currency = wdContext.nodeOPCURROutput().nodeIt_Curr_Rate().getIt_Curr_RateElementAt(i).getFcurr();
msg.reportSuccess("Currency : "+currency);
divSMT.put(currency,currency);
catch(Exception e)
//@@end
_________END________
Please look into the issue.
Regards. -
Hyperlink for a row content (Not for a filed/column)
Hello Friends,
I need to insert hyperlink for particular row value. I have code for adding hyperlink for a field that is column.
Newspaper
language
epaper
xxxxx
xxx
[email protected]
yyyyy
yyy
[email protected]
zzzzz
zzz
[email protected]
for each row I must have different link. i.e. for xxx newspaper I must have a link [email protected] associated with that and when I click on that it should take me to that link in browser.
Is there any field(like col-text and col-pos) in the table lvc_t_fcat so that I can add the link here.
Please share any idea for this requirement.
Thanks in advance.see the link attached with the previous replay.
DATA:
BEGIN OF t_itab OCCURS 0. "Output data
INCLUDE STRUCTURE sflight.
DATA carrid_handle TYPE int4. "Corresponding link id from t_hype_link(this field for 'carrid')
DATA END OF t_itab.
Registering field CARRID_HANDLE with 'CARRID' in fieldcatlog.
fs_fcat-fieldname = 'CARRID'.
fs_fcat-web_field = 'CARRID_HANDLE'.
fs_hype_link-handle = '1' . "link id
fs_hype_link-href = 'http://www.google.com' .
APPEND fs_hype_link TO t_hype_link.
LOOP AT t_itab .
IF t_itab-carrid = 'AA'.
t_itab-carrid_handle = '1' . "assigning link for each row
ENDIF.
MODIFY t_itab.
ENDLOOP. -
Deactivate the double click/ hot spot for a particular row in alv grid.
Hello,
As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
Regards,
Sarojwhere u define layout there is a field hotspot.like
data: var.
if con is true
var = 'X'. (show hotspot)
else.
var = ' '. (deactive hotspot)
elseif ws_fieldcat-fieldname = 'DMBTR'
AND ws_fieldcat-tabname = 'T_MTAB'.
ws_fieldcat-do_sum = C_X.
<b>ws_fieldcat-hotsopts = var.</b>
MODIFY Wt_fieldcat FROM ws_fieldcat
TRANSPORTING DO_SUM.
It is helpful for u. if any problen send me ur coding i will change it.
Regards
Manish Kumar -
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? -
First of all, apologies if this question has been asked before. I did search for it, but couldn't find it anywhere.
I have an iMac on my desk, and right next to my desk I have a 32" Samsung HD TV (Model No: LE32C450). As I don't have a DVD player for my TV, I was wondering if there was any way that I could connect my iMac to my TV for watching movies using Front Row? And before anyone says it, I know I could just buy a DVD player for like £20, but I wouldn't just be using this for DVDs.
Now, I'm not all that good with the technical side of stuff, such as which cables and adapters I'd need, or if I'd need any special software and things like that. My iMac has a Mini DisplayPort, and my TV has 3 HDMI slots, and according to the manual for the TV, one of them is DVI.
I know it's possible to use a TV as a monitor, but would it work for what I want? The iMac doesn't seem to have an Audio Out slot, so I guess I couldn't use my TV's speakers? And would the resolution be good enough for things like movies? I believe the TV is 720p (so not full HD) if that makes any difference. Basically, I don't want to spend money on this if the picture and/or sound are going to be poor.
Sorry for such a long question, but any help would be much appreciated. If you need any more info, just ask and I'll do my best.
ThanksActually, it's a little more complicated than Kappy suggests. "Pairing" the remote means only ONE remote will control the device that's been paired. However, that same remote will still control other devices. So, unless you have two remotes and can pair each one with one device (computer & Apple TV), one device will still receive stray commands.
If you do have two remotes, then pair one to the Apple TV and the other to the MacBook. Then they won't get confused. Pairing a remote with the Apple TV does NOT appear in Mac OS X help at least not in either Mac I checked. However, pairing a remote with a computer does:
http://docs.info.apple.com/article.html?path=Mac/10.5/en/8993.html
Pairing your remote with the Apple TV:
http://support.apple.com/kb/HT1555
If you only have one remote, in the MacBook's Security System Preferences, check on the option to disable the built-in IR receiver. With the receiver off, the MacBook won't react to any signals from the Apple TVs remote.
-Doug -
How to set different font for a particular row in jtables?
How to set different font size and font type for a particular row in jtable?
More than enough sample code here:
[http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
db -
How to merge the contents of two rows in ALV for particular column data
Hi Experts,
I have a requirement to merge various rows in a ALV Grid with same data for particular columns.
Kindly Suggest,
Thanks and Best Regards,
SahilHi,
Just fill the and pass the SORT table for what ever fields you want this functionality.
DATA: lwa_sort TYPE lvc_s_sort.
CLEAR lwa_sort.
MOVE: 'VBELN' TO lwa_sort-fieldname,
'X' TO lwa_sort-up,
APPEND lwa_sort TO i_sort.
Now pass this SORT table to ALV FM.
Thanks,
Vinod. -
How can set colour for a particular row?
Hi all,
in my context ,i have a field like epi_type.i want to set entire row in red colour wherever epi_type = emergency.
How can i aceieve this?
Regards,
RaviI'm assuming that you are using this ALV for WD, else I don't think it is possible in 'normal' table view.
It seems not to be opening the thread I tried to provide when clicking so I will give the answer (copy from above mentioned thread):
U will be having one Node for that ALV Table Know.Add one Attribute for eg., CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN.In the Properties of Table Column Properties there is one Field Called CellDesign.U Map the Attribute CELL_DESIGN for the Column which u want Color.If u want for a Row then map that attribute for each column.
U cant set ur own colors for the Cell.In the CellDesign Property u will be having a Dropdown in which a list of values will be present u can make use of that colors.
U can give the CellDesign Colors from the Documentation such as badvalue_dark,badvalue_light,etc.,
During the Runtime,based on the condition u can set the Values for that Attribute Using SET_ATTRIBUTE.
For Eg.,
DATA lo_nd_table TYPE REF TO if_wd_context_node.
DATA lo_el_table TYPE REF TO if_wd_context_element.
DATA lt_table TYPE wd_this->elements_table.
DATA ls_table TYPE wd_this->element_table.
lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
get element via lead selection
lo_el_table = lo_nd_table->get_element( ).
lo_nd_table->get_static_attributes_table(
IMPORTING
table = lt_table ).
loop at lt_table into ls_table.
if ls_table-text = '1'.
lo_el_table->set_attribute(
name = `CELL_DESIGN`
value = 'negative' ).
elseif ls_table-text = '2'.
lo_el_table->set_attribute(
name = `CELL_DESIGN`
value = 'positive' ).
endif.
endloop.
Edited by: Micky Oestreich on Apr 16, 2008 10:56 PM -
Searching for a string in the xml present in a particular row and column.
Hi All,
We have a table in which in one of the column a complete payload xml is getting stored.
Is there any way to search for a particular string in the stored xml of a particular row?
Thanks in Advance,
BobHere is a simple example of what Blu is saying
I have create a table temp_dept like this
SQL> desc temp_dept
Name Null? Type
DEPTNO NUMBER
DNAME VARCHAR2(10)
LOC VARCHAR2(8)
EMP_XML XMLTYPE
I have loaded employee detail from emp table into emp_xml as xml data. here is a sample
SQL> select * from temp_dept;
DEPTNO DNAME LOC EMP_XML
10 ACCOUNTING NEW YORK <?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAM
20 RESEARCH DALLAS <?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAM
30 SALES CHICAGO <?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAM
Now i can convert the emp_xml into a table and query like this
SQL> select d.deptno
2 , d.dname
3 , d.loc
4 , e.*
5 from temp_dept d
6 , xmltable
7 (
8 '/ROWSET/ROW' passing d.emp_xml
9 columns empno number path 'EMPNO'
10 , ename varchar2(100) path 'ENAME'
11 , job varchar2(100) path 'JOB'
12 , mgr number path 'MGR'
13 , hiredate varchar2(100) path 'HIREDATE'
14 , sal number PATH 'SAL'
15 , com number PATH 'COM'
16 ) e
17 /
DEPTNO DNAME LOC EMPNO ENAME JOB MGR HIREDATE SAL COM
10 ACCOUNTING NEW YORK 7782 CLARK MANAGER 7839 09-JUN-81 2450 0
10 ACCOUNTING NEW YORK 7839 KING PRESIDENT 17-NOV-81 5000 0
20 RESEARCH DALLAS 7369 SMITH CLERK 7902 02-APR-81 2975 0
20 RESEARCH DALLAS 7566 JONES MANAGER 7839 02-APR-81 2975 0
20 RESEARCH DALLAS 7788 SCOTT ANALYST 7566 19-APR-87 3000 0
20 RESEARCH DALLAS 7876 ADAMS CLERK 7788 23-MAY-87 1100 0
30 SALES CHICAGO 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300
30 SALES CHICAGO 7521 WARD SALESMAN 7698 22-FEB-81 1250 500
30 SALES CHICAGO 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400
30 SALES CHICAGO 7698 BLAKE MANAGER 7839 01-MAY-81 2850 0
30 SALES CHICAGO 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0
11 rows selected.
SQL>
You can apply filter for the necessary value that you are searching. -
Can I use Concatenate function for multiple rows?
I have a lead list that contains 5000 leads. The format of this list contains address data that is saved in separate columns (ie: address, address 2, city, state, zip). I need this data in 1 column. I tried to use the concatenate function to combine the data for 1 row and it worked perfectly. I tried to do this for multiple rows and the function is greyed out. Is there a work around or way that I can combine this data for all 5000 rows without doing it 1 by one?
Look at this table;
In B9, the formula is;
=B2&" "&C2&" "&D2&" "&E2&" "&B3&" "&C3&" "&D3&" "&E3
Yvan KOENIG (VALLAURIS, France) dimanche 18 octobre 2009 20:51:47 -
ALV Weddynpro : Text color for a row(for a particular record)
Hello Friends,
Situation : Webdynpro App utilizing re-usable ALV component to Edit(changed/modify) Employee records.
I have used to the class cl_salv_wd_uie_a_input to make certain columns read_only and colored(cell background only).
My requirement :
Suppose there are 4 rows and based on if a certain condition is staisfied(lets say 2 rows), then i have to changed the color ONLY THE TEXT(to RED). There is certain meaning for the rows for such records which users can easily interpret.
I have tried to used CL_SALV_WD_UIE_TEXT_VIEW(which i have successfully color coded the texts), but i lose the editing capabilities.
The webdynpro App uses a EDITABLE-ALV meaning that, user can insert/modify/delete records and save them in the DB.
Is there anyway to have both this features using above said situations and consequences?
OR
Pls share any workaround if anyone has tried this before?
Regards
Vinay.
Example.
PERNR
COL1
COL2
102984
UYYER
IIIELX
102983
DFKLJJ
DOFUOU
102985
DOFJDOFU
DFOIUOIU
102988
DFOADSFUOU
OSDUFOUHi,
We can assign semantic colors only to text view fields. So in this case since you are forcibly changing the view to text view, for text coloring, we are losing the edit fields capabilities. Instead setting the type of field( text view / input view ) based on the your condition could be best, so that editing capabilities is also not missed and text coloring is also not missed.
Or you can set all fields to input fields and set the read only/edit property based on the condition and set the cell design of the fields accordingly, so that the users can distinguish easily.
Regards,
Harsha
Maybe you are looking for
-
ios 7.0.4 is suck
-
How can I add a custom made share button for Facebook?
Hi! I have built a custom "share"-button for Facebook (with an additional layer for rollover/active states, using photoshop), but I don't know how to make it work? What code do I have to use, or can I just create a link using my button? What would th
-
Can you please help me out? When I bring up all my songs on my iPhone onto iTunes software, the songs are all greyed out. It does not give me the option to delete them. What do I do?
-
ACR adjustments not showing up in Bridge
I've done some searching but have not found an answer to my ? So hope it isn't a repeat. I'm on a iMac with 16 gig of RAM and updated graphics card running the latest version of Lion. After downloading the beta of CS6/ACR7 I have noticed that if I'
-
Hi, I am saving graphics from Word for usage in a Framemaker document. When I copy and paste the file into photoshop it becomes blurred and unusable. How do I resolve this? I have tried saving the file in it's highest resolution but that doesn't work