Passing Arrays to the DataGrid Component
How's it going my peoples? I'm having some difficulties
passing Arrays into a DataGrid Component. It just doesnt seem to
work for me. Anyone have any ideas on the best way of doing this?
Thank you in advance.
We have Our site build using odp.net but suddenly it stoped working on the production server. MS Provider is working fine in that case. so we want to have one copy of solution with MS provider as backup copy so in future if any failure occurs to odp.net we can use this copy. So for that I need to know how to pass arrays to oracle using MS Provider.
Regards,
Suresh
Similar Messages
-
Passing array data into datagrid
Hi,
I need to pass data from an Array ( of Strings) into a datagrid. I have used the following text:
<mx:DataGrid id="dg1" x="400" y="50" dataProvider="{myArray}">
<mx:columns>
<mx:DataGridColumn headerText="Names" />
</mx:columns>
</mx:DataGrid>
The DataGrid does not show any data as I have not mentioned the dataField. Can you please tell - what woud the dataField be in this case as the array contains simple strings.Because your adding an Object to the arrayCollection you can add as many field names as you like as below.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var ac:ArrayCollection = new ArrayCollection();
private function init():void {
var obj:Object = new Object();
obj.name = 'Andrew';
obj.town = 'Taunton';
obj.sex = 'Male';
var obj1:Object = new Object();
obj1.name = 'Jane';
obj1.town = 'Glastongury';
obj1.sex = 'Female';
ac.addItem(obj);
ac.addItem(obj1);
]]>
</mx:Script>
<mx:DataGrid x="42" y="47" dataProvider="{ac}">
<mx:columns>
<mx:DataGridColumn headerText="Name" dataField="name"/>
<mx:DataGridColumn headerText="Town" dataField="town"/>
<mx:DataGridColumn headerText="Sex" dataField="sex"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
In yours you just need to loop through your data source and create the objects and add them to the collection.
Andrew -
How to pass array in the url of the servlet
Hi Friends,
How can i pass an array in the URL that calls a servlet. For instance,I have this in my servlet rite now:
MyClass obj = new MyClass();
String[] args = {"-opt1","-opt2","file1","file2","file3"};
obj.main(args);I want that the "args" should come in the URL call,because some php application would be calling this, for instance:
http://localhost:8080/MyProject/MyServlet?args=somearray
MyClass obj = new MyClass();
String[] arg = request.getParameter("args");
obj.main(arg);Please help..I would really appreciate it.
ThanksSorry,needed to edit this,I am getting some problem,please help if you can:
I call the java class from the servlet as shown above,and it executes fine but only for the first time...after that the tomcat automatically shuts down .....can someone explain me why????
How can i get the execution control back to the servlet ..for example:
System.out.println("Before execution..");
MyClass obj = new MyClass();
String[] arg = request.getParameter("args");
obj.main(arg);
System.out.println("After execution..");prints only "before execution..."..so can someone please tell me how can i bring the control back to the servlet...
Thanks
Message was edited by:
java80 -
How to display HyperLink on the DataGrid Component column data.
Hi ,
I am able to display customer data on to the DataGrid with the help of a ArrayCollection,
Similar as shown :
<mx:columns>
<mx:DataGridColumn dataField="customerid" headerText="Employee ID"
itemRenderer=""/>
</mx:columns>
Please tell me what should be the value inside the itemRenderer to make the customerid display as an HyperLink ??
I am struck up mx.controls.----?? value on to the itemRenderer
Please suggest .
Thanks in advance .And Following is answer for http://forums.adobe.com/thread/630928?tstart=0
<mx:DataGridColumn headerText="Employee ID"
editorDataField="text" dataField="customerid"
itemRenderer="mx.controls.TextInput" editable="true"/>
Just replace TextInput--->YPaticular controll(LinkButton)
please help to answer this
http://forums.adobe.com/thread/630962
Happy codding.... -
Passing array to the procedure in parameter
Hi
I tried the following code,
Where my aim is to split the comma separated values and insert into an array, and then pass that array to another procedure in a package
CREATE OR REPLACE PACKAGE PAK_SPLIT_TEST AS
PROCEDURE PROC_SPLIT(IN_LIST VARCHAR2) ;
END;
CREATE OR REPLACE PACKAGE PAK_SPLIT_TEST AS
PROCEDURE PROC_SPLIT(IN_LIST VARCHAR2) ;
END;
CREATE OR REPLACE PACKAGE PAK_SPLIT_TEST
AS
PROCEDURE PROC_SPLIT (IN_LIST VARCHAR2);
END;
CREATE OR REPLACE PACKAGE BODY PAK_SPLIT_TEST
AS
PROCEDURE PROC_REM_LIST (p_array l_data)
IS
BEGIN
FOR i IN 1 .. p_array.COUNT
LOOP
DBMS_OUTPUT.put_line (p_array (i));
END LOOP;
END;
PROCEDURE PROC_SPLIT (IN_LIST VARCHAR2)
IS
TYPE SPLIT_array IS TABLE OF VARCHAR2 (4000)
INDEX BY BINARY_INTEGER;
l_data SPLIT_array;
l_txt LONG := '100,200,300,400,500,600';
l_str LONG := IN_LIST || ',';
l_n NUMBER;
BEGIN
BEGIN
l_data.delete;
LOOP
l_n := INSTR (l_str, ',');
EXIT WHEN NVL (l_n, 0) = 0;
l_data (l_data.COUNT + 1) := SUBSTR (l_str, 1, l_n - 1);
l_str := SUBSTR (l_str, l_n + 1);
END LOOP;
PROC_REM_LIST (l_data);
END;
END;
SELECT *FROM USER_ERRORSI'm getting the following error at line no. 30
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin end function package pragma procedure formCould you please help me in this
Thanks,
SmileGive this a shot:
CREATE OR REPLACE PACKAGE BODY PAK_SPLIT_TEST
AS
TYPE SPLIT_array IS TABLE OF VARCHAR2 (4000)
INDEX BY BINARY_INTEGER;
PROCEDURE PROC_REM_LIST (p_array SPLIT_array)
IS
BEGIN
FOR i IN 1 .. p_array.COUNT
LOOP
DBMS_OUTPUT.put_line (p_array (i));
END LOOP;
END;
PROCEDURE PROC_SPLIT (IN_LIST VARCHAR2)
IS
l_data SPLIT_array;
l_txt LONG := '100,200,300,400,500,600';
l_str LONG := IN_LIST || ',';
l_n NUMBER;
BEGIN
BEGIN
l_data.delete;
LOOP
l_n := INSTR (l_str, ',');
EXIT WHEN NVL (l_n, 0) = 0;
l_data (l_data.COUNT + 1) := SUBSTR (l_str, 1, l_n - 1);
l_str := SUBSTR (l_str, l_n + 1);
END LOOP;
PROC_REM_LIST (l_data);
END;
END;
END pak_split_test;
/PROC_REM_LIST was expecting a PL/SQL type of L_DATA. You have not defined that type anywhere (e.g. in your package spec, body, or in SQL). I move the declaration from PROC_SPLIT to your package body and it compiles.
Hope this helps! -
Can we call the Datagrid Column Sort function?
Is it possible to call the same function within the datagrid
component that is used when we do an onClick event of the column
headers? When you click on the column header, it will sort the
column ascending or descending.
I would like to call that same process after the datagrid is
loaded, programmatically. But the same as if the user had clicked
the column.
I have looked at examples in the help that sort the
dataprovider array. But if we are able to do this at runtime with a
user clicking on the column, it seems that it should be possible
since the datagrid is doing a sort on the internal dataprovider
object for the datagrid.
If it is not available now, this functionality should be
added.
Thanks.Yes, you can do what you want by setting the data provider's
"sort" property
to be an instance of class Sort, and putting one or more
SortFields inside the
Sort.
If you put just a single SortField inside the Sort, then the
header field will
have the up/down triangle indicating the results of the sort,
just as if the
user had clicked on the column. If you put two or more
SortFields inside the
Sort, then there won't be a triangle, because of course it
wouldn't make sense
to put on there.
Here is a small sample:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Array id="mydata">
<mx:Object col1="b" col2="p" col3="z" />
<mx:Object col1="c" col2="r" col3="y" />
<mx:Object col1="b" col2="q" col3="x" />
<mx:Object col1="a" col2="q" col3="x" />
<mx:Object col1="d" col2="q" col3="x" />
<mx:Object col1="c" col2="q" col3="x" />
</mx:Array>
<mx:ArrayCollection id="mycollection"
source="{mydata}">
<mx:sort>
<mx:Sort>
<mx:fields>
<!-- This example has field "col2"
as its primary sort field, and
field, and field "col1" as its
secondary sort field.
If you remove one of these lines,
so only a single SortField
exists, you will see a triangle
in the header of the sorted
field in the DataGrid.
-->
<mx:SortField name="col2" />
<mx:SortField name="col1" />
</mx:fields>
</mx:Sort>
</mx:sort>
</mx:ArrayCollection>
<mx:DataGrid id="dg" height="474"
dataProvider="{mycollection}" >
<mx:columns>
<mx:DataGridColumn headerText="Column 1"
dataField="col1"/>
<mx:DataGridColumn headerText="Column 2"
dataField="col2"/>
<mx:DataGridColumn headerText="Column 3"
dataField="col3"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Mike Morearty
Developer, Flex Builder team
http://www.morearty.com/blog -
Passing array to call library function running on VxWorks (cRIO)
Hello,
I am using a cRIO 9012 running VxWorks.
I have a Call library function VI in my application and I want to pass arrays of doubles to this function.
The problem is that I can not access the values in the array.
Here is the source code of my function:
#include "D:\\Programme\\National Instruments\\LabVIEW 8.5\\cintools\\extcode.h"
double avg_num(double *in1, double *out1)
double ret;
ret = in1[0] + out1[0];
return ret;
The value of in1[0] and out1[0] is always.
When passing no arrays but single values, all is fine. But since my application is more complex than this example, I need to pass arrays.
The block diagram and parameter specification is as shown in the attached screenshots.
I am compiling the source code with the Gcc 6.3 which is available here:
http://zone.ni.com/devzone/cda/tut/p/id/5694
What am I doing wrong?
Or is passing arrays not supported on cRIO?
Maybe the makefile needs to be modified?
Thank you.
Best regards,
Christian
Attachments:
vi.JPG 88 KB
parameter.JPG 41 KBI guess I have solved the problem.
The key was to set the parameter "Minimum size" for all function parameters to <None>.
Having this, I can read the passed arrays. I do not know why this works but at the moment, it is ok for me.
Thank you all. -
Customizing DataGrid component in Flash CS3 using AS3
Can anyone please explain how to customize the DataGrid
component in Flash CS3 using AS3???
How do you remove/change the grid lines for the rows and
colums?
How do you remove/change the border?
My day has been lost searching for this answer. Flash
Documentation is worthless and Google finds nothing with regards to
AS3. ASDGRH.
Thanks in advance,
TedWebI hope you've found a resolution to this by now, but I just noticed the discussion title when posting a captioning issue.
In a nutshell, create a listener on your FLVPlayback module with a VideoEvent.SKIN_LOADED event. You'll also need to set the showCaptions in your FLVPlaybackCaptioning object to true. Apparently, if the captions are set to false when the player object loads the skin, the captions aren't recognized and your captions toggle will require an extra click to activate the captions.
Here's the link to another discussion on the same topic with all of the details:
http://kb2.adobe.com/cps/402/kb402452.html
Also, have you had any issues with the caption button in the FLVPlayback skin not showing up? That's my current issue. Here's the discussion for it:
http://forums.adobe.com/thread/796423?tstart=0 -
How can I pass a value from the datagrid to my textinput
Hi i am new in adobe flex!
I have only one row in my datagrid and it has 5 dataField. Those dataFields are id, ln, fn, kurs, yr. I want to pass those value into a textinput respectively.
Heres my code:
<mx:DataGrid x="396" y="10" width="110" height="124" id="dginfo" enabled="true" dataProvider="{studinfo.lastResult.datas.data}" creationComplete="studinfo.send()" editable="false" visible="true">
<mx:columns>
<mx:DataGridColumn headerText="C0" dataField="username" visible="false"/>
<mx:DataGridColumn headerText="C1" dataField="id"/>
<mx:DataGridColumn headerText="C2" dataField="ln"/>
<mx:DataGridColumn headerText="C3" dataField="fn"/>
<mx:DataGridColumn headerText="C4" dataField="kurs"/>
<mx:DataGridColumn headerText="C5" dataField="yr"/>
</mx:columns>
</mx:DataGrid>
I want to pass it here (code)
<mx:TextInput backgroundColor="#ABA5A5" editable="false" enabled="true" color="#000000" horizontalCenter="-50" verticalCenter="-71" id="idview" text="{data.id}"/>
<mx:TextInput id = "idview" editable="false" enabled="true" text="{data.ln}"/>
<mx:TextInput id="lnview"editable="false" enabled="true"text="{data.fn}"/>
<mx:TextInput id="fnview" editable="false" enabled="true" text="{data.kurs}"/>
<mx:TextInput backgroundColor="#ABA5A5" editable="false" enabled="true" id="yrview" text="{data.yr}"/>
My problem is that this code won't work, it won't diplay anything...:Dit must not display anything as data.ln doesnot have any value. in your code, in the text property of textfield, data is considered as a property of your application, a dynamic object; so even it doesnot have ln property, it is not showing error, neither displaying anything.
do you mean to populate your textfields if the datagrid row is selected? if so:
<mx:TextInput id = "idview" editable="false" enabled="true" text="{dginfo.selectedItem.ln}"/>
if you want to populate the same data without caring if it is selected in datagrid, you should not think like you are getting data from datagrid, instead, you are getting your values directly from the studinfo.lastResult
in such:
<mx:TextInput id = "idview" editable="false" enabled="true" text="{studinfo.lastResult.datas.data.ln}"/>
note: if your result contains more than one data, you should treat it as array:
studinfo.lastResult.datas.data[0].ln -
Passing Array to Custom Component
I have a custom button component that has the following setter function:
//get title dimensions
[Bindable]
public function get titleDims():Array {
return _cubeTitleArray;
In main.mxml, the button MXML code is as follows:
<comp:updateButton
id="update"
cubeName="{_cubeName}"
viewName="{_viewName}"
serverChartId="{_serverChartId}"
titleDims="xxx"
enabled="false"/>
How do I specify an array in the titleDims property so the button can use it?
The array would be something like:
{Month: comboBox1.text, Year:comboBox2.text, Sales Order:comboBox3.text}
There are spaces in the key values. I would like to know how to deal with those also.
Thanks!Use associative array. Something like this
var myArray:Array = new Array();
myArray["Month"] = "some value";
myArray["Sales Order"] = "some other value";
Check this livedocs page for reference
http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_4.html -
Passing arguments to a custom component in the constructor
I would like to know if it is possible to pass arguments to a
custom component in the constructor when I'm instantiating it
within Actionscript. I've not seen anyone do this, so at the moment
I have a couple of public properties defined on the custom
component and then do the following:
var myComponent:TestComponent = new TestComponent();
myComponent.propertyOne = true;
myComponent.propertyTwo = 12;
etc.
Whereas I'd like to do something like:
var myComponent:TestComponent = new TestComponent( true, 12
Any ideas if this is possible?Another approach as opposed to creating init function is to link symbol with autogenerated class (just assign it a class but do not create *.as file for it) and use it just as graphical view with no functionality (well only MovieClip's functionality).
ViewClip.as
public class ViewClip extends MovieClip {
public var view:MovieClip;
public function ViewClip(){
this.view = instantiateView();
this.addChild(view);
protected function instantiateView():MovieClip {
return new MovieClip();
Circle.as
public class Circle extends ViewClip {
public function Circle(scaleX:Number, scaleY:Number) {
super();
override protected function instantiateView():MovieClip {
return new ClassView(); -
How can I dynamically pass values to the DayOfWeek array given below?
I have this below code:
var onMondayAndTuesday = DailyTimeIntervalScheduleBuilder.Create()
.OnDaysOfTheWeek(new DayOfWeek[] { DayOfWeek.Monday, DayOfWeek.Tuesday });
var trigger = TriggerBuilder.Create()
.StartAt(DateBuilder.DateOf(StartHour, StartMinute, StartSeconds, StartDate, StartMonth, StartYear))
.WithSchedule(onMondayAndTuesday)
.WithCalendarIntervalSchedule(x => x.WithIntervalInWeeks(Int32.Parse(nWeekInterval)))
.EndAt(DateBuilder.DateOf(0, 0, 0, EndDay, EndMonth, EndYear))
.WithIdentity(triggerKey)
.Build();
Here depending on the days users have selected any weekday would be passed in to the DaysOfWeek array. It might be just monday or monday
and friday etc. How can I achieve this? Please advice.
mayooran99Try this:
DayOfWeek[] days = new DayOfWeek[7];
days[0] = DayOfWeek.Friday;
days[1] = DayOfWeek.Monday;
days[2] = DayOfWeek.Saturday;
var onMondayAndTuesday = DailyTimeIntervalScheduleBuilder.Create()
.OnDaysOfTheWeek(days);
also you can use it as a list:
List<DayOfWeek> d = new List<DayOfWeek>();
d.Add(DayOfWeek.Friday);
Fouad Roumieh -
Passing a collection to the ActiveX component / copying a collection to another
[Migrated from the Syclo Resource Center]
KarthikSetty 05/06/2011 10:48,
Hi,We need to pass a collection to an ActiveX component. With 5.2.8 this is possible. My collection needs to be selected dynamically. If it were a property I can be easily set using a rule. But I dont see how I can return a collection through a rule. One of the scenarios that we need to implement is to pass a list of notification objects for a particular work order, where the work order id is set by the activex component as an eternal value.What I was thinking of doing is to have a dummy notification collection under the main object which I would populate based on the work order id. The Agentry value of the Active X will point to this.
Is there a easy way to copy the contents from one collection to another?I need to copy the notification object from MainObject -> select WorkOrder by key -> Notification Collection to MainObject -> Temp Notification Collection.The only way to copy a collection is to loop through the collection and copy each object individually. Is there a way to do this in one step?
Thanks,Karthik
Jason Latko 05/06/2011 11:12
Karthik,Unfortunately there is no easier way to do this.
You need to go about it the way you suggested one at a time by looping over the parent collection and adding objects to your new collection, initializing each property value "from other object" in the add transaction.
Jason Latko - Senior Product Developer at Syclo
KarthikSetty 05/06/2011 14:24
Alright, Thanks for your response.[Migrated from the Syclo Resource Center]
KarthikSetty 05/06/2011 10:48,
Hi,We need to pass a collection to an ActiveX component. With 5.2.8 this is possible. My collection needs to be selected dynamically. If it were a property I can be easily set using a rule. But I dont see how I can return a collection through a rule. One of the scenarios that we need to implement is to pass a list of notification objects for a particular work order, where the work order id is set by the activex component as an eternal value.What I was thinking of doing is to have a dummy notification collection under the main object which I would populate based on the work order id. The Agentry value of the Active X will point to this.
Is there a easy way to copy the contents from one collection to another?I need to copy the notification object from MainObject -> select WorkOrder by key -> Notification Collection to MainObject -> Temp Notification Collection.The only way to copy a collection is to loop through the collection and copy each object individually. Is there a way to do this in one step?
Thanks,Karthik
Jason Latko 05/06/2011 11:12
Karthik,Unfortunately there is no easier way to do this.
You need to go about it the way you suggested one at a time by looping over the parent collection and adding objects to your new collection, initializing each property value "from other object" in the add transaction.
Jason Latko - Senior Product Developer at Syclo
KarthikSetty 05/06/2011 14:24
Alright, Thanks for your response. -
How to access the datagrid in one mxml in another component
I have a datagrid in a.mxml. when click on the add button, it comes to a b.as file (not a class) to do some things and then, b.as call a popupwindow (c.mxml) to add a row into table (call backend). After I added the row to database table successfully, I want to add the row into datagrid to display, but I could not access the datagrid in a.mxml from c.mxml. How can I do this?
Thank you in advance.If this post answers your question or helps, please mark it as such.
To add a row to the DataGrid you really need to just add data to the dataProvider collection object.
You can access components by going through the main app:
mx.core.Application.application.myA.myVar = myC.cVar;
But you should really be using custom events to communicate between components, though it is more complex. Here is my Flex 3 Cookbook post of the topic of custom events:
http://cookbooks.adobe.com/post_Building_a_wizard_using_a_simplified_MVC_architect-11246.h tml
Here are some sample apps on custom events on my web site (right click to View Source):
http://www.chikaradev.com/learning/flex3/customevents/CustomEventSimple/CustomEventSimple. html
http://www.chikaradev.com/learning/flex3/customevents/CustomEvents1/index.html
http://www.chikaradev.com/learning/flex3/customevents/CustomEvents2/CustomEvents2.html
http://www.chikaradev.com/learning/flex3/customevents/CustomEvents3/CustomEvents3.html
Here is my tutorial on custom events:
http://www.chikaradev.com/learning/flex3/customevents/StudentsTutoringCustomEvents1.pdf -
Flash 2.0 Datagrid component bug ?
Recently I found a bug in Datagrid component. The swf file
which contain datagrid act differely in IE 6, and IE 7.
This is what I've done:
1) Compile swf, export it together with html file.
2) Run the html file
3)Press on one of the cell,drag it and then release it
outside of the browser/flash canvas.
4)Move the mouse pointer back to flash canvas
5)The grid will scroll automatically( move the move up and
down to test)
6)After a few times mouse pointer movement, suddenly IE
crash, CPU usage 100%
I have tested the swf file on firefox 2.007 and stand alone
flash player, however, none of the flash player have this bug.
Therefore I suspect that the ActiveX flash plugin for IE cause this
bug.
This is the source code, which I use to create the datagrid
for testing.
ps: open one fla file, drag datagrid component from component
panel to the stage or it will not run.
import mx.controls.DataGrid;
var header = "Stock Code/\nName,Type,Status,Order
Date\nTime,Duration,OrderQty/\nPrice,Matched Qty/\nPrice,Trd
Curr/\nMatched Value,Account No/\nOrder No";
var wid =
"90,43.2699356842522,91.5969497381748,87.4747020181826,60.4473499934867,67.9851014914014, 90.2231829093762,111.8984058876167,134.104372277509";
var alig = "left ,left, left , left , left , right , right ,
right , left ";
var halig = "center ,center,center , center , center , center
, center , center , center ";
var fxdata:Array = new Array();
fxdata[0]= new Array("67676
GPACKET","Buy","Expired","05/09/2007 06:04:20 PM","Day","200
4.34","0 0.00","MYR 0.00","423423423432");
fxdata[1]= new Array("054066
FASTRAK","Buy","Expired","05/09/2007 01:45:18 PM","Day","47,900
0.27","0 0.00","MYR 0.00","fdsfsdfsdf");
fxdata[2]= new Array("737013
HUBLINE","Sell","Expired","05/09/2007 11:53:19 AM","Day","400
0.69","0 0.00","MYR 0.00","93743");
fxdata[3]= new Array("31474
L&G","Buy","Expired","03/09/2007 11:35:35 AM","Day","500
0.70","0 0.00","MYR 0.00","389dskjfsd");
fxdata[4]= new Array("38182
GENTING","Buy","Expired","28/08/2007 11:38:59 AM","Day","500
7.35","0 0.00","MYR 0.00","90sklsdakl");
fxdata[5]= new Array("05005
PALETTE","Buy","Expired","28/08/2007 11:08:23 AM","Day","500
0.115","0 0.00","MYR 0.00","jsdaflk;as");
fxdata[6]= new Array("093082
GPACKET","Buy","Expired","27/08/2007 03:49:43 PM","Day","300
3.82","0 0.00","MYR 0.00","jsdafj;sda");
fxdata[7]= new Array("644769
KELADI","Buy","Expired","27/08/2007 11:05:36 AM","Day","10,000
0.30","0 0.00","MYR 0.00","jsadjf;lkdas");
fxdata[8]= new Array("676653
KASSETS","Buy","Expired","24/08/2007 06:15:33 PM","Day","500
2.93","0 0.00","MYR 0.00","jlsdf;adas");
fxdata[9]= new Array("473323
JAKS","Buy","Expired","23/08/2007 04:45:03 PM","Day","100 0.915","0
0.00","MYR 0.00","jjkljsdlfasd");
fxdata[10]= new Array("03069
IPOWER","Buy","Expired","22/08/2007 10:18:01 AM","Day","9,800
0.365","0 0.00","MYR 0.00","jlajsd;lfjads");
fxdata[11]= new Array("05025
LNGRES","Buy","Expired","21/08/2007 03:08:06 PM","Day","9,900
0.28","0 0.00","MYR 0.00","jlkjsdafl");
fxdata[12]= new Array("01308 N2N","Buy","Expired","21/08/2007
10:34:51 AM","Day","200 1.71","0 0.00","MYR 0.00","mjkjadsflasd");
fxdata[13]= new Array("70069
IPOWER","Buy","Cancelled","21/08/2007 10:02:08 AM","Day","0
0.37","0 0.00","MYR 0.00","jkjasd;fsda");
fxdata[14]= new Array("03069
IPOWER","Buy","Cancelled","20/08/2007 07:20:54 PM","Day","0
0.38","0 0.00","MYR 0.00","jkjsdlkfjsdaf");
fxdata[15]= new Array("12651
MRCB","Buy","Replaced","20/08/2007 05:31:59 PM","Day","900 2.35","0
0.00","MYR 0.00","upuewoirwe");
var mdtgrid:DataGrid;
_root.createEmptyMovieClip("displayobj1",
_root.getNextHighestDepth(),{_x:0,_y:0});
initial();
function initial(){
_root.mdtgrid =
_root.createClassObject(mx.controls.DataGrid, "xxx",
_root.getNextHighestDepth());
_root.mdtgrid.doLater(_root,"setData");
function setData(){ //insert data to datagrid
var temp:Array = new Array();
for (var i in _root.fxdata){
temp
= new Object();
for (var j in _root.fxdata){
temp
[j] = _root.fxdata[j];
_root.mdtgrid.dataProvider =temp;
_root.mdtgrid.doLater(_root,"setdgStyle");
function setdgStyle(){
var rowhight = 40;
var noofrow = 8;
var headerheight = 35;
var gridheight = (rowhight * noofrow) + headerheight ;
_root.mdtgrid.setSize(800, gridheight);
_root.mdtgrid.rowHeight =rowhight;
_root.setHeader(_root.header.split(","));
_root.setWidth(_root.wid.split(","));
_root.setAlign(_root.alig.split(","));
_root.mdtgrid.invalidate();
function setHeader(datasource:Array){ //set header label
var leng:Number = _root.mdtgrid.columnCount;
var sleng:Number = datasource.length;
var temp:Object;
for (i =0 ;i<leng;i++){
if (i>=sleng){
break;
_root.mdtgrid.getColumnAt(i).headerText = datasource
function setWidth(datasource:Array){ //set columns width
var leng:Number = _root.mdtgrid.columnCount;
var sleng:Number = datasource.length;
var temp:Object;
for (i =0 ;i<leng;i++){
if (i>=sleng){
break;
_root.mdtgrid.getColumnAt(i).width = Number(datasource);
function setAlign(datasource:Array){ //set Alignment
var leng:Number = _root.mdtgrid.columnCount;
var sleng:Number = datasource.length;
var temp:Object;
for (i =0 ;i<leng;i++){
if (i>=sleng){
break;
temp = _root.mdtgrid.getColumnAt(i);
temp.setStyle("textAlign",trim(datasourceAnyone know how to fix it ?
Maybe you are looking for
-
Can't get my external hard drive to show up on MacBook Pro
I used Time Machine to keep backups for my MacBook Pro using the latest version of Lion. I backed up to a WD external drive. My computer went to be repaired and they had to put in a new hard drive. When I got home and plugged in the external drive it
-
How do you manually lower the resolution on a hp photosmart 209a-m printer
I want to print with black ink only and lower the resolution. How can you manually lower the resolution settings? Black ink only is no issue but I cannot lower the resolution to below the 600 that it's set for. Wasting ink! Planning on getting a
-
Announcement/message before shutdown by using Automator?
I wondered if it was possible to show a message or announcement when I try to shut down, like a message of some sorts that reminds me to set my Magic Mouse on off to save batteries and stuff like that. I'm not experienced enough with Applescript to k
-
Can't open iPhoto says it is locked
Here is what comes on the screen: The iPhoto Library is locked, on a locked disk, or you do not have permission to make changes to it. I haven't done anythiong except earlier I plugged in my iPhone. The iphoto screen showed up and I quit it.
-
what is the technical reason behind not creating the sender side cc in case of idoc adapter ? (Don't say that it is based on ABAP stack and thats y....not needed) points will be rewarded for correct answers..... regards chandrakanth