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.
Similar Messages
-
Date format in text item-solved
Two text item with data type date.I insert dates in the text item in the format for ex.
01-jun-07 but the text item takes it as 01-jun-0007.
how to correct the format?
Message was edited by:
user588306Hello,
in the formate mask property of the text item write :
dd-mon-rrrr or dd-mon-yyyy
regards,
Abdetu.. -
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 -
Prohibit certain data in datetime text-item
Hello!
I'm trying to prohibit the user from entering the datetime at midnight hour (DD-MON-YYYY 00:00). Basicly the user can tab itself out of the text-item after inserting the day month and year. I want to make it so that he is forced to enter the hour and minute also.
I've looked through the property palette but i don't seem to find any with which i can do that.
Thx,
Iulianhi
set the format mask in property.
format mask
dd/mm/yyyy hh24:mi:ssand u may try somethin like this too.
Declare
Date_Exception Exception ;
Begin
If length(:dual.test_date) = 6 then
:dual.test_date := to_char(to_date(:dual.test_date,'ddmmrr'),'dd/mm/yyyy');
Elsif length(:dual.test_date) = 8 then
:dual.test_date := to_char(to_date(:dual.test_date,'ddmmyyyy'),'dd/mm/yyyy');
Elsif length(:dual.test_date) = 10 then
:dual.test_date := to_char(to_date(:dual.test_date,'DD-MM-YYYY'),'dd/mm/yyyy');
Else
RAISE date_exception;
End If;
Exception
When date_exception Then
Message('acceptible date formats are: ddmmyy(yy), dd/mm/yyyy, dd-mm-yyyy');pause;
RAISE FORM_TRIGGER_FAILURE;
When Others Then
Message(sqlerrm);pause;
Raise form_trigger_failure;
End;
Re: Date Format Issue with Pre-Insert trigger
sarah -
How can display date and time in text item ?
Hello all,
I have placed two text items (named text_item1,text_item2).
I want to place the current date in one text item and place current time in another text item. how can i place this?Hi
This depends on ur needs
WHEN-NEW-FORM-INSTANCE > if u want to appear it on the very begining moment
--=============
u can use
WHEN-VALIDATE-ITEM > on ur date fields
Here is a link that may help u decide where to take off with this code...
http://www.dotnetspider.com/resources/22433-Triggers.aspx
http://www.slideshare.net/magupta26/oracle-forms-tutorial
Hope this helps ,
Regards,
Abdetu... -
How to validate Date value in Text Column
Hi All,
I have entered DATE value in text item field(Char Data Type), Now how can i validate, the entered date is valid or not.
Thanks in advance.Well, the easiest way would be to make the item of datatype DATE.
Another possibility is to try to convert the given value to a date in the WHEN-VALIDATE-ITEM-trigger, like
DECLARE
dt DATE;
BEGIN
dt:=TO_DATE(:BLOCK.ITEM);
-- if code comes here, the date is valid
EXCEPTION
WHEN OTHERS THEN
-- seems to be no valid date
MESSAGE('Error');
RAISE FORM_TRIGGER_FAILURE;
END;Edited by: Andreas Weiden on 19.12.2010 12:23 -
Difference between data form and data grids
Can anybody tell me what is the difference between data form and data grid.
Regardsdata forms have restricted access. user can not access all the dimension and members, based on his role and authentication can access the form.
data grid r used for calculation, currency translation and coslidation and it consists of menu of options for diffrent consolidation based on cell status.
data grid can have line item information, description and cell status information. -
How to disable copy option for a text item in oracle forms
Hello experts,
I am using oracle forms 11g with weblogic server 10.3.5 at windows7.I have a text item in my oracle form and I have to disable to being copy from a text item in oracle forms.Actually I have to make two text item.First text item to type a password and another text item is also to type password.Here I want that the data from first text item should not be copy through the use of mouse or keyboard shortcut key.
thank you
regards
aadityaThank You To reply, Actually doing so as you said,My problem would not be solved.This would hide data in text item than I will not be able to copy that but in my case the data should not be concealed.Actually I have to make a Form to User registration and here is a strictly boundation to have a right email address of user.There would two text items for this purpose as: N_User_Email------> to type email address in text item.Here user would not be able to copy text written from N_User_Email R_User_Email ------> to type email address again as in N_User_Email.
-
hi
I have some text items, user enters data into these text item and presses ok button.
After that the data is inserted into the database, but the text items are not cleared.
What should I do to clear text items after an insert?Ricardinho wrote:
one last question:
During insert, I runinto an error message:
INSERT INTO DRV(DRIVER_NO,DRIVER_NAME,VEHICLE_REGISTER,DRIVER_CERTIFICATE,DRIVER_ABN,ADDRESS,PHONE,*DRIVER_NUMBER*,*VEHICLE*,*VOUCHER*) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10)
ORA-00904: Voucher invalid identifier
Eventhough I delete DRIVER_NUMBER,VEHICLE,VOUCHER items from the database and from the datablock, I still got this error message?
Any idea?ORA-00904 is the error code for invalid identifiers, your SQL clearly showing that the block still has the three columns as database items in your block.
make sure you don't have in any block the items set as database items.
Tony -
Text item of varchar2(2000) with vertical scrollbar not displaying properly
Hi,
I have a text item of varchar2(2000) with a vertical scroll bar.
I am populating data into the text item using a forms procedure.
(Look at the sample code below)
The problem is the rpadding is NOT displayed properly. I mean
the detail records are NOT shown straight below their respective column heading
in the text item. (BUT if I cut this stuff from the text item and paste it in a
notepad, then the alignment is correct and the data is shown below their
respective column headings)
My code is something like below ...
CURSOR c_get_lab_client_results
IS
SELECT res.lr_id lr_id, org.short_name org_name, TO_CHAR(res.specimen_taken_date,'DD-MON-YYYY') std, substr(res.accession_number,1,20) acc_num, res.lr_type lrtype, res.hdc_id hdcid
FROM bc_organisations org,
cq_laboratory_results res
WHERE cli_id = :clients.cli_id
AND lr_id = :results.lr_id
AND res.org_id = org.org_id
ORDER BY lr_id;
Begin
-- Header
SELECT :TRFRDTLS.TRANSFER_DETAILS||RPAD('ORGANISATION',16,' ')||' '||RPAD('SPECIMEN DATE',15,' ')||' '||RPAD('ACCESSION NUMBER',20)||' '||RPAD('RESULTS',16,' ')||chr(10)||chr(10)
INTO :TRFRDTLS.TRANSFER_DETAILS FROM DUAL;
-- Detail
FOR c1 IN c_get_lab_client_results LOOP
ls_results := RPAD('XXXX',16,' '); -- Just for example
SELECT :TRFRDTLS.TRANSFER_DETAILS||RPAD(TO_CHAR(c1.org_name),16,' ')||' '||RPAD(c1.std,15,' ')||' '||RPAD(c1.acc_num,20)||' '||ls_results||chr(10)
INTO :TRFRDTLS.TRANSFER_DETAILS FROM DUAL;
END LOOP;
End;
Thanks in advance.
CheersTry using a monospace font such as Courier New for the text item.
-
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 -
Text in data grids doesn't display
With the new 29 version of FireFox, data grids on our site don't seem to display the data in the grids any longer. When using Chrome or IE11, these still show just fine. Version 28 and earlier worked great. The menu system in our site doesn't work well any longer either using version 29.
What we are seeing on this site was also seen with IE11 when it first came out but that was easily fixed by just using the "compatability" settings in IE11 and adding our site to the list of compatible sites. There isn't such a setting in FireFox so I wonder how we go about getting around this.Thanks for the offer but we no part of this site can be publicly accessed. The thought of a font causing the problem doesn't make much sense to me because it was working fine prior to version 29. Why would the font all of a sudden be causing the problem. Furthermore, it isn't just text in data grids but the menu system we use doesn't work properly either. You have to hold down on the left mouse button to use the menu and then when you are on the item you want to select, let off the left mouse button. Guess our only option is to start recommending Chrome or IE.
-
Populating a Forum froma data grid in Flex
I have a forum that I would like to pouplate to be able to edit the information in Flex (flash builder four). So how would I click on a row of data (from a datagrid) and have it populate the forum?
Hi,
Do you mean a Form? Try listening for the "gridClick" event on the DataGrid and looking at the "item" property of the event. This event dispatches when the user clicks on the DataGrid and item will be the data object from the row that the user clicks on. I've written up a simple example below:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<s:layout>
<s:VerticalLayout gap="10" paddingTop="10" paddingRight="10" />
</s:layout>
<fx:Script>
<![CDATA[
import spark.events.GridEvent;
protected function dataGrid_gridClickHandler(event:GridEvent):void
var item:Object = event.item;
if (item)
keyTI.text = item.key;
nameTI.text = item.name;
]]>
</fx:Script>
<s:DataGrid id="dataGrid" gridClick="dataGrid_gridClickHandler(event)">
<s:ArrayCollection>
<fx:Object key="1000" name="Abrasive" />
<fx:Object key="1001" name="Brush"/>
<fx:Object key="1002" name="Clamp"/>
<fx:Object key="1003" name="Drill"/>
<fx:Object key="1004" name="Epoxy"/>
<fx:Object key="1005" name="File" />
<fx:Object key="1006" name="Gouge"/>
<fx:Object key="1007" name="Hook"/>
<fx:Object key="1008" name="Ink" />
<fx:Object key="1009" name="Jack" />
</s:ArrayCollection>
</s:DataGrid>
<s:Form>
<s:FormItem label="key">
<s:TextInput id="keyTI" />
</s:FormItem>
<s:FormItem label="name">
<s:TextInput id="nameTI" />
</s:FormItem>
</s:Form>
</s:Application>
Of course, you'll have to write some code so that the you can edit the data and save it from the Form. Hope this helps.
-Kevin -
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
-
Podcast removed from the iTunes directory as a result of technical problem
I received an email from iTunes informing me that my feed: http://www.mevio.com/feeds/d4emixtape.xml Had been removed from the iTunes directory because the feed had some sort of technical issue. I've checked the feed a couple of ways including using
-
Can I use anther computer to recver my apple ipod 5 touch screen
I for got my iPod 5 touch screen pass code and I am trying to recover it from another computer can I do that
-
Can't install certificate on E61
Nothing I do seems to work when I try to install our server's self signed certificate so I can use our Exchange Server I have exported the certificate no problem on a Windows machine. Understand that no problem I have tried via a webserver download c
-
Cinema Tools crashes on new Macbook
I purchased a new Macbook and migrated all the content from the previous. Currently running 10.8.2. Cinema Tools 4.0.1 crashes at start (unexpectedly quit) every time. Checked disk utilities, no permissions issues. Process: Cinema Tools [1750] Pa
-
Making octave plot in SVT to use g/SQRT(Hz) units
I have been trying to measure some random vibrations, and it appears the main analysis approach required mesurement of Amplitude spectral density, typically expressed in units of um/sqrt(Hz), plotted on a 1/3rd octave plot vs frequency. Is there a wa