Flex 4 Data Grid Title chromecolor - can it be changed per column?
Is there a property or style that can change the color of a data grid's title chromcolor? Much like the chromecolor of a title window?
Thanks.
Hi,
Are you referring to the GridColumnHeaderGroup (DataGrid's header bar)? If so, you can use the "color" style on GridColumnHeaderGroup to change the header renderers' text color. Otherwise, you can create your own header renderer for the GridColumnHeaderGroup and set it to the "headerRenderer" property of the GridColumnHeaderGroup in the DataGrid's skin.
-Kevin
Similar Messages
-
Flex 4 Data Grid: Can text items be interactive?
This is more of a question about possibilities since I've not used datagrids beyond displaying SQL/PHP data in columns. I've already seen that the columns can be indivdually colored, so I suspect that many other properties can be changed as well.
Can the text items in a datagrid respond to mouse events much like the TextArea and other text controls? Can they have tooltips? PopUps? Also, can the text be formatted like html text?
Or is the datagrid a good match for displaying "records" but not what I want to do?
Thanks.You have to use item renderers for the datagrid columns.So you can display the data in whichever form you want and then you can show tooltips and other things that you want for the individual renderers.
-
Can we dynamically change the column based on drill filter parameters
Hi All,
Is it possible to pass the drill filter parameter from a parent WebI report to Child webI report.
Here is the scenario:
There ar 2 WebI reports: Test1 and Test2.
Test1 is the parent report which is having the drill options and a link to detial report.
Depending upon user selection of Region, Market Unit or Country the detail report should display data dynamically by taking those drill filters as input for prompts of second report.
ie. if user drills to region = APJ, detail report should only display APJ Data at detail level.
If user is on drill level = Market Unit, only that Market unit details should be displayed, similarly for country.
I am able to pass the drill parameters of Test1 report using the formula:
="<A HREF=https:///OpenDocument/opendoc/openDocument.jsp?sType=wid&sDocName="+URLEncode("Test2")
"&sWindow=New&lsMRegion="URLEncode(If(DrillFilters([Region])="" ; [Region_All];DrillFilters([Region])))"&lsMMU="URLEncode(If(DrillFilters([Market Unit])="" ; [MU_All] ; DrillFilters([Market Unit])))
"&lsMMU="URLEncode(If(DrillFilters([Country])="" ; [Country_All] ; DrillFilters([Country])))
">""Detail Report"+"</A>"
But I am not sure what formula I need to write in the Test2 report so that column changes based on the drill filter selection in Test1 Report.
Can you please someone help me out in this?
Thanks in Advance.
Regards
SindhuPlease find my replies inlined >>>
Hi Tapash,
Thanks for the reply. I have already extended the
VORowImpl class and overridden the setAttribute14.
The value gets stored in the database, but I am not
able to fetch this value using getAttribute14() in
the VORowImpl class. I am not sure why, but my
requirement is to change the value of an attribute
depending on its previous value.
You need to requery your VO to get the data back from the DB
Let me elaborate my requirement. In iprocurement we
have created a requisition using copy to cart
feature. Our requirement is to launch the Account
Generator whenever a requisition is created using
copy to cart.
Okay
This can happen if we change the value of an
attribute. I changed the value of this attribute from
the form
Do you mean you changed the value from forms application ?and observed that account generator is
launched. But as this attribute is not used by
client, I want to change the value of this internally
but it should behave the same way as if the value is
being changed from the form.
I hope this makes the requirement clear.
What i understand is, you need to launch the account generator when you create a req using copy to cart, so let us look at that, i would suggest not to change/use tha flex attibutes if not required, because the client might want to define a DFF on the field tomorrow, that is the purpose of attribute fields, now if you manage to get your requirement by using it today, it might incur rework tomorrow.I will find out how iProc works and would let you know other better way of launching the account generator.
>
Thanks -
Most of my document is fine. However a few pages have a series of yes/no questions and the software is interpreting those questions as a list to check one from many. I need it to look at each line independently. How can I edit this form to fix this problem?
I do not understand what you are trying to describe. Can you post a screenshot: https://forums.adobe.com/thread/1070933
Also, you posted in the forum for Acrobat.com online services; you'd have a much better chance to get a helpful reply if you ask in the Acrobat forum. -
08/29/2008 08:58:48 AM
Reply | Quote | Top | Bottom | Edit
hi all,
i have two classes.
class User
public String name;
public int age;
public Address address;
class Address
public String city;
I'm passing a List<Users> to the data provider of a
data grid . I can display the values of properties of Users i.e,
name and age.. My issue is how do i display the value of city which
is a propertyt of Address class in the datagrid column..
thanx in advance
Mark this message as the answer.
Print this message
Report this to a ModeratorHi,
Try labelFunction property of the DataGridColumn.
labelFunction allow you to specify a function name, which will be
invoked when that data is rendered. You will get the Object (User
id your case) corresponding the row being rendered will be passed
as argument to the function. You can use the object and return the
value you want to be displayed.
Please find more details on labelFunction at the URL below
http://livedocs.adobe.com/flex/3/langref/mx/controls/dataGridClasses/DataGridColumn.html#l abelFunction
You can also try custom item renderer.
Hope this helps. -
Data grid within advanced data grid (Hiding and showing columns)
Hi,
I have a dta grid within advanced datagrid. When the row of advanced data grid is expanded, the datagrid opens up.
I want to control the columns of datagrid based on the value of a field in advanced data grid. I want to show all the columns of the datagrid if the field value of advanced data grid is "X" else I want to show only few columns of the data grid.
I will set the id for all the columns of the datagrid. Then I think I can write some code in a method to set the visibility of the columns and assign the function to item opening property of the advanced data grid.
Please give me some ideas.
Regards,
MaheeHi,
Please go through following links:
http://www.cflex.net/showFileDetails.cfm?ObjectID=553
http://flexmusings.wordpress.com/2009/08/03/hide-row-column-datagrid/
http://www.java2s.com/Code/Flex/Grid/HidinganddisplayingDataGridcolumns.htm
Thanks and Regards,
Vibhuti Gosavi | [email protected] | www.infocepts.com -
Select various entire lines in data grid doesn't work
SQL Dev 2.1.1.64 on WinXP.
I can select entire line in data grid (or query result) by clicking on leftmost column with row number. I expect to select various lines by clicking and dragging, but it won't work. It worked in v1.5.
Thanks,
MVr.Still 3 other ways that I see:
* click on the row number of the first row, then shift-click on the row number of the last row
* click on the first cell of the first row, then drag to the last cell of the last row
* click on the row number of the second row, then click on the first cell of the first row and drag to the last row (most like what you want)
Have fun,
K. -
Add Total for a Column in Data Grid Screen Based on Query
Hi Guys , I have query based on table Payments in which I search By Start Date , End Date and tenant person [ from drop down List ].
How to display sum of Payments.[Amount] column in the query screen , which off-course varies for selected person.
OmarThe data grid doesn't support calculating aggregate functions on columns automatically, but you can write a little bit of code to show the total of the payments right beneath the data grid.
Add a screen member called PaymentsTotal that is the same type as the column that you want to sum.
Drag out the screen member to be underneath the data grid. You can change the sizing settings (e.g. Horizontal Alignment) so that it aligns with the data grid how you want it.
Select the Payments collection and select Payments_Changed from the Write Code drop down.
In the generated method, write the following code:
partial void Payments_Changed(NotifyCollectionChangedEventArgs e)
// Total is the name of the property in my Payment entity that I want to sum
this.PaymentsTotal = this.Payments.Sum(p => p.Total);
When you run the screen, the PaymentsTotal property will show the total of all of the payments that are shown in the data grid.
Justin Anderson, LightSwitch Development Team -
hi all,
i have two classes.
class User
public String name;
public int age;
public Address address;
class Address
public String city;
I'm passing a List<Users> to the data provider of a
data grid . I can display the values of properties of Users i.e,
name and age.. My issue is how do i display the value of city which
is a propertyt of Address class in the datagrid column..
thanx in advance"rnjt reddy" <[email protected]> wrote in
message
news:g98a7o$23v$[email protected]..
> hi all,
> i have two classes.
> class User
> {
> public String name;
> public int age;
> public Address address;
> }
>
>
>
> class Address
> {
> public String city;
> }
>
> I'm passing a List<Users> to the data provider of
a data grid . I can
> display
> the values of properties of Users i.e, name and age.. My
issue is how do i
> display the value of city which is a propertyt of
Address class in the
> datagrid
> column..
Use a labelFunction.
HTH;
Amy -
Hi,
I can't remeber the followings:
When we should use a Data Grid instead of a Data Form?
what are the different features?Data forms are meant for Data input. Though data can also be inputted in the Data grid. We use Data grid for running the consolidations. Further, in data forms the user has restricted POV while in case of Data Grid the user can select any members from the dimension heirarchy.
These are some of the differences..
Regards,
Madhavi -
I would like to create a Data Grid where the individual cell
colors change based on the number in the cell.
For example, numbers between 0 and 1 would be green, between
1 and 2 would be yellow, and between 3 and 4 would be red.
I am wondering if this is even possible, or if I am going to
have to find another solution other than the data grid component.
Not looking for a complete answer (but I'd be happy to have
one!) but any pointing in the right direction would be great.
I have a lot of data and coloring the cells by hand is not an
option. I don't even know if I can change individual cell colors in
the data grid- if it isn't possible I'd be willing to change the
text color instead.
Any suggestions?
Thanks!Example query:
select cust.*
, case when credit_limit > 5000 then 'red' else 'green' end as bg_color
from (
select
CUSTOMER_ID,
CUST_FIRST_NAME,
round(dbms_random.value(1000,9000)) as CREDIT_LIMIT
from #OWNER#.DEMO_CUSTOMERS
) custIn the Column Definition of CREDIT_LIMIT, set the HTML-Expression to <div style="background-color:#BG_COLOR#">#CREDIT_LIMIT#</div>
See result : http://apex.oracle.com/pls/apex/f?p=41715:3
You could also construct the whole html in the SQL but I like to divide logic (SQL) and UI.
Another option could be to create a Dynamic Action (After Refresh of the report region) and create a combination of a nifty selector and piece of JavaScript, but I guess this is easier. -
Since upgrading Iphone to iOS 5.1.1 it does not automatically divert to my wi-fi internet when wifi is available in my home. It has been draining my mobile data I now have very high bills from my mobile carrier for high data usage. I can only manually change settings in the Network and turn cellular data on and off everytime I get home and leave the home. This is very frustrating as it wasn't a problem until the upgrade. I have spoken to a few people that this has happened to. Has anyone found this problem and does anyone have other solutions?
Please disregard this question. I'll submit a shorter and more direct question. Thanks.
-
Thanks in advance
Exactly wat i need is
1.if i click the open button want to visible all datagrid ,its working perfectly.
2.if i click the close button want to close all data grid ,its working perfectly.
3. if i click a particular list means want to visible particular datagrid..some times working good but some times not visible ...
4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
if u cont get clearly please copy the below code and check it.......any other way to solve this problem?.......
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
<fx:Declarations>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var ArrUserList:ArrayCollection;
[Bindable]
public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
{label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
public var loc_first_last_name:String;
function Load():void
ArrUserList=Find_Duplicate(listDB);
for(var i:int=0; i<ArrUserList.length; i++)
ArrUserList[i].click=0;
Lst_userlist.dataProvider=ArrUserList;
Lst_userlist.rowCount=ArrUserList.length;
function Clink_lnk_open():void
if(lnk_open.label=="Open")
for(var i:int=0; i<ArrUserList.length; i++)
ArrUserList[i].click=1;
lnk_open.label="Close";
ArrUserList.refresh();
Lst_userlist.validateNow();
Lst_userlist.dataProvider=ArrUserList;
Lst_userlist.rowCount = ArrUserList.length ;
else
for(var i:int=0; i<ArrUserList.length; i++)
ArrUserList[i].click=0;
lnk_open.label="Open";
ArrUserList.refresh();
Lst_userlist.validateNow();
Lst_userlist.dataProvider=ArrUserList;
Lst_userlist.rowCount = ArrUserList.length ;
function Click_UserName1(event:MouseEvent,data:Object):void
loc_first_last_name=event.currentTarget.text;
var str:String;
for(var i:int=0; i<ArrUserList.length; i++)
str=ArrUserList[i].label;
if(loc_first_last_name==str)
if(ArrUserList[i].click == 0)
ArrUserList[i].click=1;
else
ArrUserList[i].click=0;
ArrUserList.refresh();
Lst_userlist.validateNow();
Lst_userlist.dataProvider=ArrUserList;
Lst_userlist.rowCount=ArrUserList.length;
public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
var res_arr:ArrayCollection=new ArrayCollection();
var flag:Boolean;
for(var i:int=0;i<test_arr.length;i++)
var j:int=0
flag=false;
for(;j<res_arr.length;j++)
if(res_arr[j].label==test_arr[i].label)
res_arr[j].dataCollection.addItem(test_arr[i]);
flag=true;
break;
if(!flag)
var myItem:Object = new Object() ;
myItem.label=test_arr[i].label;
myItem.dataCollection=new ArrayCollection();
myItem.dataCollection.addItem(test_arr[i]);
res_arr.addItem(myItem) ;
return res_arr;
]]>
</fx:Script>
<s:Scroller id="id_scroller" width="100%" height="100%">
<s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10" width="100%" height="100%" >
<mx:VBox width="850" paddingLeft="0" paddingTop="1" color="black" backgroundColor="#FFFFFF">
<mx:HBox width="850" left="50" paddingBottom="3" paddingLeft="5" backgroundColor="#6D6C6C" paddingTop="3" color="#FFFFFF" >
<mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
<mx:Button id="load_btn" label="Load" click="Load()"/>
</mx:HBox>
<mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
<mx:List variableRowHeight="true" width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off" horizontalScrollPolicy="off"
buttonMode="true" >
<mx:itemRenderer>
<fx:Component>
<mx:VBox paddingTop="-5" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
override public function set data(value:Object):void
super.data = value;
Membership_Grid.dataProvider=data.dataCollection;
Membership_Grid.rowCount=data.dataCollection.length;
lbl_userhead.text=data.label;
lbl_userhead1.text=data.dataCollection.length+" Datas";
if(data.click==1)
Vbox_main.visible=true;
Vbox_main.includeInLayout=true;
else
Vbox_main.visible=false;
Vbox_main.includeInLayout=false;
Membership_Grid.validateNow() ;
]]>
</fx:Script>
<mx:HBox id="vbox_grid" horizontalScrollPolicy="off" height="25" verticalScrollPolicy="off" width="850" paddingLeft="10" paddingTop="5" backgroundColor="#6D6C6C" color="#FFFFFF">
<s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true" width="250" paddingTop="3" />
<s:Label id="lbl_userhead1" buttonMode="true" width="548" paddingTop="3" />
</mx:HBox>
<mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off" visible="false" includeInLayout="false" >
<mx:DataGrid id="Membership_Grid" alternatingItemColors="[#DCDCDC,#F8F8FF]" paddingLeft="5" horizontalScrollPolicy="off" color="black"
horizontalGridLines="false" verticalScrollPolicy="auto" verticalGridLines="false" rowHeight="25" width="850" borderSkin="{null}"
borderVisible="false" >
<mx:columns>
<mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
<mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
<mx:DataGridColumn width="150" headerText="Day" dataField="day" />
<mx:DataGridColumn width="150" headerText="Date" dataField="date"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:VBox>
</fx:Component>
</mx:itemRenderer>
</mx:List>
</mx:VBox>
</mx:VBox>
</s:VGroup>
</s:Scroller>
</s:Group>Hi
Sir am using flex 4.0.1 SDKS 4.1.0....
Still i cont fix this problem....i have the same prob in many mxml files .any alternate solution for my prob pls let me know...
Thanks in Advance,
senthil. -
How to put an image in a data grid in Flex Builder 2
Hi All,
I need to populate a data grid with some text data received
from a web service and, in a particular column of the datagrid, I
have to put an image depending of a specific data returned me by
the web service.
It seems that there is the possibility to add an image in
data grid column with the cellRenderer properties, but this
property is available only for ActionScript 3.
I'm developing an application in Flex Builder 2 that run
ActionScript 2 and cellRenderer properties is not available. Is it
right?
If no, I will can use this cellRenderer properties in my
application. Please, can you show me an example?
If yes, there is a way to insert an image in datagridcolumn
with ActionScript 2?
Thank you very much
RegardsFlex Builder 2 uses Actionscript 3.
You will need to write a renderer for for this column.
There are a lot of examples of datagrids with images in them.
here is one from the livedocs
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html -
Pulling Data from an imported web service into a data grid - Flex 3.0
Hi all,
I have created a web service from Oracle using JDeveloper and imported it into my Fex 3 project, and I am trying to populate a data grid with the data from the web service. I was trying to emulate the example found in my Adobe Flex 3.0 for Dummies book (see http://dougmccune.com/flexfordummies/chapter14/srcview/index.html), and while the code from the book with that data service works fine, I can't get my application to work. My issue is with the part of code mx:DataGrid dataProvider="(service)" - I do not know how to specify what to use for the data source to populate the data grid from my imported web service. Any suggestions or examples would be helpful, as I am a newcomer to Adobe Flex. My code is as follows:
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"xmlns:webservices="
generated.webservices.*">
<mx:Script>
<![CDATA[
private function getData():void {service.getPdRec(ageDt.text);
]]>
</mx:Script>
<webservices:PD_Pct_Web_Service id="service" />
<mx:VBox>
<mx:HBox width="100%">
<mx:TextInput id="ageDt" width="100%" />
<mx:Button id="submitButton" label="Search" click="getData()" />
</mx:HBox>
<mx:DataGrid dataProvider="(service.getPdRec_lastResult
" rowHeight="
58" width="100%" height="300">
<mx:columns>
<mx:DataGridColumn dataField="creditManager" headerText="Credit Manager" width="40" />
<mx:DataGridColumn dataField="pdTarget" headerText="PD Target" width="40" />
<mx:DataGridColumn dataField="totalPd" headerText="Total PD" width="40" />
<mx:DataGridColumn dataField="pdPct" headerText="PD Percent" width="50" />
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:Application>
My web service returns the following when invoked:
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://erec_db/PD_Pct_Web_Service.wsdl/types/">
<env:Body>
<ns0:getPdRecResponseElement>
<ns0:result>
<ns0:creditManager>Cobb</ns0:creditManager>
<ns0:pdTarget>10</ns0:pdTarget>
<ns0:totalPd>147.65</ns0:totalPd>
<ns0:pdPct>26.77</ns0:pdPct>
</ns0:result>
<ns0:result>
<ns0:creditManager>Collova</ns0:creditManager>
<ns0:pdTarget>10</ns0:pdTarget>
<ns0:totalPd>27.71</ns0:totalPd>
<ns0:pdPct>21.67</ns0:pdPct>
</ns0:result>
<ns0:result>
<ns0:creditManager>Lee</ns0:creditManager>
<ns0:pdTarget>10</ns0:pdTarget>
<ns0:totalPd>33.61</ns0:totalPd>
<ns0:pdPct>72.38</ns0:pdPct>
</ns0:result>
<ns0:result>
<ns0:creditManager>Maynard</ns0:creditManager>
<ns0:pdTarget>10</ns0:pdTarget>
<ns0:totalPd>74.19</ns0:totalPd>
<ns0:pdPct>33.69</ns0:pdPct>
</ns0:result>
<ns0:result>
<ns0:creditManager>Ong</ns0:creditManager>
<ns0:pdTarget>10</ns0:pdTarget>
<ns0:totalPd>13.26</ns0:totalPd>
<ns0:pdPct>46.06</ns0:pdPct>
</ns0:result>
</ns0:getPdRecResponseElement>
</env:Body>
</env:Envelope>Use data binding. <mx:DataGrid dataProvider="{service.getPdRec_lastResult}"
-Radhakrishna
Maybe you are looking for
-
How do you get your photos in to different photo albums?
How do you get your photos into different photo albums on a i phone 4
-
the built-in keyboard on my macbook is not functioning right, the number keys when pushed display the special characters instead of the numbers, the caps button doesn't work at all, the letter buttons display capitals when pushed whether the caps but
-
Is there a grace period for apple email address?
Hey guys I was wondering if there was a grace period for apple email address yourname@'insert apple domain name'.com once you deactivate or delete it before it can be used again? for example with phone numbers for certain companies it takes 2yrs once
-
Hi All, I am trying to figure out how I can dynamically assign roles within BPM. So I want to be able to route the BPM process to the manager of the user that the process was assigned. I am just not sure how to dynamically do this within BPM. Any tho
-
Hi, I need to map IDOC to xml but the problem is I have 400 fields in IDOC which are to be mapped to 20 elements in XML. As it a tedious process to go to 400 fields for each xml element.Is their any better way to find correct field in IDOC w