Flex DataGrid Component

Can i extend the Flex DataGrid using ActionScript and create as  Add-On Component ?

I've been trying to get this to work.  But i'm having issues   Not sure if it's related to the Array binding limitation mentioned in the release notes.  Maybe someone else has some ideas.
I'm trying to bind to the dataProvider property of the DataGrid.  That way when the user in Xcelsius selects a range, it will bind the data in the excel sheet to the DataGrid.
Problem is that i'm only getting one value to update (specifically the top value).  At this time i'm only trying to bind a single column of data.
I noted that the commitProperties function gets called whenever a cell changes that i'm bound to, but the dataProvider is only receiving the first value of the array.  Even odder is that the ArrayCollection that i receive simply looks like this:
commitProp:dataProvider=(mx.collections::ArrayCollection)#0
  filterFunction = (null)
  length = 1
  list = (mx.collections::ArrayList)#1
    length = 1
    source = (Array)#2
      [0] 1
    uid = "A37C62CC-F3DC-E1B1-8159-CE984C2CCE33"
  sort = (null)
  source = (Array)#2
So i see that i get an array collection of ArrayList objects, the first one of which simple contains the value in the excell sheet "1".
I noted that the proxy.bind function has a parameter called "chain", maybe this is what i need to get multiple value binding?  The documentation for the calls are pretty basic, which is understandable as this is new technology.
So anyone have some ideas?  Maybe someone from BO who is apart of the SDK group can comment?

Similar Messages

  • Import CSV/Excel data into Flex Datagrid using Java/JSP

    Hi,
    Is there any way we can import excel/csv data into flex datagrid component.
    I see that is been done using php in this site. http://code.google.com/p/as3xls/
    Any help would be appreciated.
    Thanks in advance

    You can store the list of data from the Excel sheet that you have read already into an ArrayList
    Then go through the JDBC tutorial, and learn how to insert a single record into the table.
    After you understand how to insert a single record, you can iterate through the ArrayList of data and insert them into the table in the database.
    If you know JDBC, see if you can use OR Mapping frameworks like Hibernate or iBatis, they make it very easy to manage database in Java.

  • Flex Datagrid Issue

    Hi
    I am using a flex datagrid component which has around 48 columns.
    There is a option for the user to select which columns he wish to see.
    Based on the user's selection the visible columns will be 1-50.
    The Datagrid is inside a Vbox container.
    The issue is, based on the screen resolution and the number of columns selected extra scroll bars(horizontal and vertical) appears
    for the whole Vbox in addition to the Datagrid's scrollbars.
    i.e if resolution is high and user selects more than 46 columns extra scroll bar appears.
    If resolution is low the extra scroll bars appears as soon as the visible columns is more than 20.
    Please help me if there is any resolution in preventing the extra scroll bars from appearing.Ideally, Since datagrid has its own scroll bars making more columns visible should not increase the width of datagrid.
    Any help will be appreciated

    Have you hard-coded the height and width of both the VBox and the Datagrid? If you set the datagrid height and width 40 pixels or so less than the VBox it should solve that problem, I'd think.
    Or, you could set your DataGrid height and width to 90%.
    Sorry if you've already tried this. Another option is to set your datagrid's scroll policy to "off" and just leave the VBox's scroll bars available.
    -John

  • Flex DataGrid with Dynamic Grouping

    Does anyone know of any examples of Flex datagrids that have
    grouping features comparable to the numerous grid components
    available in the ASP.NET world? I’m thinking of .NET
    component vendors such as Telerik, Infragistics, Component Art,
    DevExpress, etc.
    The way these .NET controls generally work is that you drag
    the header of a column to a bar above the grid, which causes the
    grid to redraw based on the new grouping you just specified.
    This is an example of a grid component that I am currently
    using:
    Telerik
    Grid
    Thank you,
    Mike Chabot

    The renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Flex datagrid borders off by 1px?

    Is there a way to extend the datagrid component or any to her way to avoid this?
    Flex datagrid column header borders and column borders keep going off by 1px... and they randomly alternate when resized.
    I have no idea how to fix this, and it to me looks like a problem with flex, not so much what i coded
    http://screencast.com/t/NmI3Zjk0NmU
    http://screencast.com/t/YzE0NDk5 - resized
    It's like it's going off by 1px because of some rounding error... no idea why this is happening, and I'm using
    Code I'm using (a bit sloppy but still)
    http://pastebin.ca/1888773

    I could use someone's help on this... Every single datagrid i create (at least with a custom header gradient, I think), has borders off by 1px, what can I do to fix this?  I've even seen this happening on other sample flex projects. No idea how to fix this

  • No DataGrid component?

    I believe JavaFX seriously needs a DataGrid component to render tabular data as a GRID, where data can be paged, sorted, filtered like other data grid solutions (Adobe Flex, jQGrid, DataTables etc).
    This is one of the basic controls, any serious application would definitely need. TableView is the only closest thing I found, but that doesn't fit the bill at all.
    The DataFx project looks promising, but is very primitive.
    I hope Oracle will come up with a pretty GRID control soon, to beat the competition. We were planning to go with JavaFX and the only thing that is stopping us is the lack of a GRID component, we have to look for other web-based alternatives now.

    I think there's more to the TableView API than you're seeing, as it's supported by the JavaFX Properties and Collections APIs. The columns are exposed as a mutable, observable List, as is the data. So the columns are dynamic and can be readily changed as necessary, the table will update automatically.
    I used you example as a way to test this out; I've made no effort whatsoever to make this look good, the css is relatively straightforward. Also, I have no knowledge whatsoever of your business domain, so this will likely look somewhat naive. I think the code structure might be helpful though. There are some things I wish were a bit different but I'll come to that after the code.
    I'm going to assume you have some kind of data model and some way of knowing when the data's changed. I've mocked this up with a DataModel class with listener notification, but there are other ways this could happen (could be an EJB, for example). I've made this completely agnostic with respect to JavaFX.
    DataModel.java (a mockup of something I assume you already have existing):
    import java.util.ArrayList;
    import java.util.List;
    public class DataModel {
         private double minDeviation ;
         private double maxDeviation ;
         private int numDeviationCategories ;
         private int numRows ;
         private List<DataListener> listeners ;
         public DataModel(double minDeviation, double maxDeviation,
                   int numDeviationCategories, int numRows) {
              this.minDeviation = minDeviation;
              this.maxDeviation = maxDeviation;
              this.numDeviationCategories = numDeviationCategories;
              this.numRows = numRows;
              this.listeners = new ArrayList<DataListener>();
         public String getValue(int row, double deviation) {
              int category = (int) ((numDeviationCategories - 1)*(deviation - minDeviation) / (maxDeviation - minDeviation)) ;
              return String.format("f(%d, %d)", category+1, row+1);
         public double getMinDeviation() {
              return minDeviation;
         public void setMinDeviation(double minDeviation) {
              if (minDeviation != this.minDeviation) {
                   this.minDeviation = minDeviation;
                   fireDeviationRangeChanged();
         public double getMaxDeviation() {
              return maxDeviation;
         public void setMaxDeviation(double maxDeviation) {
              if (maxDeviation != this.maxDeviation) {
                   this.maxDeviation = maxDeviation;
                   fireDeviationRangeChanged();
         public int getNumDeviationCategories() {
              return numDeviationCategories;
         public void setNumDeviationCategories(int numDeviationCategories) {
              if (numDeviationCategories != this.numDeviationCategories) {
                   this.numDeviationCategories = numDeviationCategories;
                   fireNumDeviationCategoriesChanged();
         public int getNumRows() {
              return numRows;
         public void setNumRows(int numRows) {
              if (this.numRows != numRows) {
                   this.numRows = numRows;
                   fireNumRowsChanged();
         public void addDataListener(DataListener l) {
              listeners.add(l);
         public void removeDataListener(DataListener l) {
              listeners.remove(l);
         private void fireDeviationRangeChanged() {
              DataEvent event = new DataEvent(this);
              for (DataListener l : listeners) {
                   l.deviationRangeChanged(event);
         private void fireNumDeviationCategoriesChanged() {
              DataEvent event = new DataEvent(this);
              for (DataListener l : listeners) {
                   l.numDeviationCategoriesChanged(event);
         private void fireNumRowsChanged() {
              DataEvent event = new DataEvent(this);
              for (DataListener l : listeners) {
                   l.numRowsChanged(event);
    }And there are two almost trivial supporting classes to support the listener notification:
    public interface DataListener {
         public void deviationRangeChanged(DataEvent event);
         public void numDeviationCategoriesChanged(DataEvent event);
         public void numRowsChanged(DataEvent event);
    public class DataEvent {
         private final DataModel source ;
         public DataEvent(DataModel source) {
              this.source = source;
         public DataModel getSource() {
              return source;
    }The TableView exposes ObservableLists for the columns and the data. We need to update those lists when the data or column structure changes. So we need an adapter to sit in front of our generic DataModel and manipulate those lists when the data changes. This class will take a reference to a DataModel in addition to references to the column list and data list; it will listen for notifications from the DataModel and update the lists as necessary. (I'm implementing each row in the table simply as a List<String>, and we retrieve each element from the row using a custom CellValueFactory.)
    TableDataModel.java:
    public class TableDataModel {
         private DataModel model ;
         private final ObservableList<TableColumn<List<String>, ?>> columns ;
         private final ObservableList<List<String>> items ;
         public TableDataModel(DataModel model, ObservableList<TableColumn<List<String>, ?>> columns, ObservableList<List<String>> items) {
              this.model = model ;
              this.columns = columns;
              this.items = items ;
              buildColumns();
              buildItems();
              model.addDataListener(new ModelListener());
         private void buildColumns() {
              int numCols = model.getNumDeviationCategories();
              List<TableColumn<List<String>, String>> colList = new ArrayList<TableColumn<List<String>, String>>();
              double minDeviation = model.getMinDeviation() ;
              double maxDeviation = model.getMaxDeviation() ;
              double colDeviationIncrement = (maxDeviation - minDeviation) / (numCols-1) ;
              Format percentFormat = DecimalFormat.getPercentInstance();
              for (int col=0; col<numCols; col++) {
                   String colTitle = percentFormat.format(minDeviation + col*colDeviationIncrement);
                   TableColumn<List<String>, String> column = new TableColumn<List<String>, String>(colTitle);
                   final int colIndex = col ;
                   column.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<List<String>,String>,ObservableValue<String>>() {
                        @Override
                        public ObservableValue<String> call(
                                  CellDataFeatures<List<String>, String> cellDataFeatures) {
                             List<String> data = cellDataFeatures.getValue();
                             return new SimpleStringProperty(data.get(colIndex));
                   colList.add(column);
              columns.clear();
              columns.addAll(colList);
         private void buildItems() {
              List<List<String>> itemList = new ArrayList<List<String>>();
              int numCols = model.getNumDeviationCategories() ;
              for (int row = 0; row<model.getNumRows(); row++) {
                   List<String> data = new ArrayList<String>();
                   double minDeviation = model.getMinDeviation() ;
                   double colDeviationIncrement = (model.getMaxDeviation() - minDeviation) / (numCols-1) ;
                   for (int col = 0 ; col < numCols; col++) {
                        double deviation = minDeviation + col * colDeviationIncrement ;
                        data.add(model.getValue(row, deviation));
                   itemList.add(data);
              items.clear();
              items.addAll(itemList);
         private class ModelListener implements DataListener {
              @Override
              public void deviationRangeChanged(DataEvent event) {
                   double minDeviation = model.getMinDeviation();
                   double maxDeviation = model.getMaxDeviation();
                   int numCols = model.getNumDeviationCategories();
                   double colDeviationIncrement = (maxDeviation - minDeviation) / (numCols-1);
                   Format percentFormat = DecimalFormat.getPercentInstance();
                   for (int col=0; col<numCols; col++) {
                        String colTitle = percentFormat.format(minDeviation + col*colDeviationIncrement);
                        columns.get(col).setText(colTitle);
              @Override
              public void numDeviationCategoriesChanged(DataEvent event) {
                   buildItems();
                   buildColumns();
              @Override
              public void numRowsChanged(DataEvent event) {
                   buildItems();
    }To test this out, I have a simple UI for changing the range of "deviations" displayed, the number of columns, and the number of rows. The controller for the UI simply instantiates a DataModel and passes calls to it when the user changes these values. In real life, of course, the changes to the data model could come from anywhere - likely from polling a server or server push. The UI also contains the TableView, retrieves the columns and items from it, and passes those, along with the data model to a TableDataModel which ties it all together. This isn't really part of the infrastructure, but for completeness here's the controller:
    Controller.java
    public class Controller {
         @FXML private TableView<List<String>> tableView ;
         @FXML private TextField minDevTF ;
         @FXML private TextField maxDevTF ;
         @FXML private TextField numColsTF ;
         @FXML private TextField numRowsTF ;
         @FXML private Button minDevIncButton ;
         @FXML private Button minDevDecButton ;
         @FXML private Button maxDevIncButton ;
         @FXML private Button maxDevDecButton ;
         @FXML private Button numColsIncButton ;
         @FXML private Button numColsDecButton ;
         @FXML private Button numRowsIncButton ;
         @FXML private Button numRowsDecButton ;
         private DataModel model ;
         public void initialize() {
              model = new DataModel(0.8, 1.2, 5, 6);
              final TableDataModel tableModel = new TableDataModel(model, tableView.getColumns(), tableView.getItems());
              model.addDataListener(new DataListener() {
                   @Override
                   public void deviationRangeChanged(DataEvent event) {
                        if (model.getMaxDeviation() - model.getMinDeviation() <= 0.01) {
                             minDevIncButton.setDisable(true);
                             maxDevDecButton.setDisable(true);
                        } else {
                             minDevIncButton.setDisable(false);
                             maxDevDecButton.setDisable(false);
                        Format percentFormat = DecimalFormat.getPercentInstance();
                        minDevTF.setText(percentFormat.format(model.getMinDeviation()));
                        maxDevTF.setText(percentFormat.format(model.getMaxDeviation()));
                   @Override
                   public void numDeviationCategoriesChanged(DataEvent event) {
                        numColsDecButton.setDisable(model.getNumDeviationCategories() <= 2);
                        numColsTF.setText(Integer.toString(model.getNumDeviationCategories()));
                   @Override
                   public void numRowsChanged(DataEvent event) {
                        numRowsDecButton.setDisable(model.getNumRows() <= 2);
                        numRowsTF.setText(Integer.toString(model.getNumRows()));
              Format percentFormat = DecimalFormat.getPercentInstance();
              minDevTF.setText(percentFormat.format(model.getMinDeviation()));
              maxDevTF.setText(percentFormat.format(model.getMaxDeviation()));
              numColsTF.setText(Integer.toString(model.getNumDeviationCategories()));
              numRowsTF.setText(Integer.toString(model.getNumRows()));
         public void decrementMinDeviation() {
              model.setMinDeviation(model.getMinDeviation() - 0.01);
         public void incrementMinDeviation() {
              model.setMinDeviation(model.getMinDeviation() + 0.01);
         public void decrementMaxDeviation() {
              model.setMaxDeviation(model.getMaxDeviation() - 0.01);
         public void incrementMaxDeviation() {
              model.setMaxDeviation(model.getMaxDeviation() + 0.01);
         public void decrementNumColumns() {
              model.setNumDeviationCategories(model.getNumDeviationCategories() - 1);
         public void incrementNumColumns() {
              model.setNumDeviationCategories(model.getNumDeviationCategories() + 1);
         public void decrementNumRows() {
              model.setNumRows(model.getNumRows() - 1);
         public void incrementNumRows() {
              model.setNumRows(model.getNumRows() + 1);
    }Here's the FXML for the UI:
    root.fxml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?import javafx.scene.layout.BorderPane?>
    <?import javafx.scene.control.ScrollPane?>
    <?import javafx.scene.layout.HBox?>
    <?import javafx.scene.layout.VBox?>
    <?import javafx.scene.layout.FlowPane?>
    <?import javafx.scene.control.TextField?>
    <?import javafx.scene.control.Button?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.control.TableView?>
    <?import javafx.scene.shape.Path?>
    <?import javafx.scene.shape.MoveTo?>
    <?import javafx.scene.shape.LineTo?>
    <?import javafx.scene.shape.ClosePath?>
    <?import javafx.scene.paint.Color?>
    <?import javafx.scene.control.ProgressIndicator?>
    <BorderPane xmlns:fx="http://javafx.com/fxml"
         fx:controller="edu.marshall.denvir.tests.gridlike.Controller">
         <top>
              <FlowPane>
                   <HBox>
                        <Label text="Min Deviation:"/>
                        <TextField fx:id="minDevTF" editable="false" />
                        <VBox>
                             <Button fx:id="minDevIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#incrementMinDeviation">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>                              
                             </Button>
                             <Button fx:id="minDevDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#decrementMinDeviation">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>                              
                             </Button>
                        </VBox>
                   </HBox>
                   <HBox>
                        <Label text="Max Deviation:" />
                        <TextField fx:id="maxDevTF" editable="false" />
                        <VBox>
                             <Button fx:id="maxDevIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10"  onAction="#incrementMaxDeviation" styleClass="increment-button">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                             <Button fx:id="maxDevDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10"  onAction="#decrementMaxDeviation">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                        </VBox>
                   </HBox>
                   <HBox>
                        <Label text="Number of columns:" />
                        <TextField fx:id="numColsTF" editable="false" />
                        <VBox>
                             <Button fx:id="numColsIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#incrementNumColumns">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                             <Button fx:id="numColsDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#decrementNumColumns">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                        </VBox>
                   </HBox>
                   <HBox>
                        <Label text="Number of Rows:" />
                        <TextField fx:id="numRowsTF" editable="false" />
                        <VBox>
                             <Button fx:id="numRowsIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10"  onAction="#incrementNumRows">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                             <Button fx:id="numRowsDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#decrementNumRows">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                        </VBox>
                   </HBox>
              </FlowPane>
         </top>
         <center>
                   <TableView fx:id="tableView"/>
         </center>
    </BorderPane>and finally the test driver:
    Gridlike.java:
    public class Gridlike extends Application {
         @Override
         public void start(Stage primaryStage) throws Exception {
              Parent root = FXMLLoader.load(getClass().getResource("root.fxml"));
              Scene scene = new Scene(root, 600, 400);
              primaryStage.setScene(scene);
              primaryStage.sizeToScene();
              primaryStage.show();
         public static void main(String[] args) {
              launch(args);
    }So that seems to me not to be too bad. Obviously in the real world there's likely to be way more functionality in the data model and table data model implementations, but the structure is pretty clean and it should integrate pretty nicely with existing structures without much effort.
    One thing I don't like is having to pass the ObservableLists to the TableDataModel. I'd prefer the TableDataModel simply to instantiate it's own lists and expose them, the way it is seems like too much strong couple from the model to the view. The problem is that the TableView only exposes ObservableLists. If it exposed ListPropertys, then those properties could just be bound to arbitrary list properties (or observable lists) exposed by a TableDataModel, which I think would be a bit cleaner.
    In terms of having APIs for binding directly from TableViews to JDBC code, or similar, I think that would be nice but is probably a bit unrealistic at this stage. What happened in the web app world was that this kind of functionality was implemented by third party frameworks, and only after the use cases had really settled down did Sun/Oracle provide standard implementations (JPA and JSF, depending on what you're looking for). I don't think we'll have to wait as long as we waited for those, but I'd guess it will be a while.
    The row headers, however, would be pretty nice, and it seems those could be fairly easily added to the TableView API. It shouldn't be too hard to create a column for them and style it so it looks different, but it would mess with the cleanliness of the data model.
    Just my $0.02 worth...

  • 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(datasource

    Anyone know how to fix it ?

  • How to disaply multiple column of a table in a single flex datagrid column

    Hi,
    I have a table in my database which has say 3 column (Firstname,LastName,Location). I wanted to display these 3 different values in a single column in flex datagrid.
    Could you please help me out in this
    Thanks,
    Pratik

    Generally, in such scenarios each column is made corresponding to the column in database only and not single column.
    However, we can setStyle of a datagrid to make it appear as if all three  columns have been populated in single.
    set verticalGridLines="false" for dataGrid. Further cosmetic changes can be made to realise the required look.
    In some cases, labelFunction of a datagridColumn also suffices the need.
    Tanu

  • Showing multiple links from inside a flex datagrid button

    Hi,
    I have a requirement where I need to show a button inside
    flex datagrid column.Which I'm doing with custom itemrenderer.When
    the User clicks on a particular button inside data grid I need to
    show him multiple links with images where user cal click on one of
    the links if he choses to do so.How do I achieve this.Any example
    is greatly appreciated.
    Regards
    mflex.

    "...show him multiple links with images ..." Where/how does
    this need to be displayed?
    Tracy

  • 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,
    TedWeb

    I 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

  • Flex datagrid pagination?

    Hi. Does the datagrid or AdvancedDataGrid support pagination?
    From what I've found, they don't seem to.

    "curious_Lee" <[email protected]> wrote in
    message
    news:g91nfo$nv8$[email protected]..
    > Hi. Does the datagrid or AdvancedDataGrid support
    pagination? From what
    > I've found, they don't seem to.
    http://gurufaction.blogspot.com/2007/02/flex-datagrid-paging-example-with.html

  • Flex datagrid french sorting

    Hi,
    I am using flex datagrid to develop an application in french,
    as french is having special character in it,
    i need to sort datagrid column in french. Flex datagrid
    unable to sort data in french. i need french sorting,
    if somebody has solution of this please help me to get out of
    this.
    If possible please reply me on
    [email protected]

    i am using inbuilt flex sorting, i am not using sortcompare()
    function.
    its just a string sorting but as its in french ,character
    &quot;
    É&quot; is comig after character &quot;
    V&quot; , because flex treated it as a special character
    . it should come before &quot;
    V&quot;. so do we need to change character set for
    flex?

  • Flex datagrid data on datachange

    Hi all,
    I am using an extended datagrid which takes its height on the basis of measured height of items. Item renderer for datagrid is a canvas. Which holds one more canvas(header for item renderer) and a text area. The problem I am facing is with the header canvas in item renderer. Header canvas has one label which diaplay a name of user. On the basis of data provider for the current item visibility of this label in header canvas is set as true or false. issue is when it set to false it repaints(on data change event) all the previous header canvas label also to visible false. And just the last item has the data. Rather it should set its visiblity false only for the current item and rest items sholud behave as value set for them.
    Thanks in advance.

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - Handling service results:
    Flex interprets the XML data that a web service or HTTP
    service returns to ..... a DataGrid control with DataTable data
    returned from a .NET web service.
    Link:
    http://livedocs.adobe.com/flex/3/html/data_access_6.html
    Flex cookbook beta - Building Flex Applications with SOAP Web
    Services:
    Mar 3, 2008 ... If you are using web services technologies
    then it is usually ... The DataGrid tag instanciates an instance of
    the DataGrid Flex control.
    Link:
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=7863
    Flex 3 - Using WebService components:
    The Flex web service API generally supports Simple Object
    Access Protocol (SOAP) ... property of a DataGrid control and
    displayed in the DataGrid control.
    Link:
    http://livedocs.adobe.com/flex/3/html/data_access_3.html
    Adobe - Flex General Discussion:
    Flex datagrid data column / webservice - justneed2know -
    08/27/2008 ... I use a web service to populate a datagrid and its
    columns (on of which is date).
    Link:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1388794&enterthread=y
    All Classes (Flex 3):
    mx.rpc.soap, AbstractWebService is an abstract base class for
    implementations that provide RPC access to SOAP-based web services.
    Link:
    http://livedocs.adobe.com/flex/3/langref/class-summary.html
    Adobe - Developer Center : Using Flex Builder to Create Web:
    Using Flex Builder to Create Web ServiceBased Flex
    Applications ... The web service result data needs to flow to the
    DataGrid. Select the 'Data will flow
    Link:
    http://www.adobe.com/devnet/flex/articles/flexbuilder_ws_04.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • Flex datagrid data column / webservice

    I use a web service to populate a datagrid and its columns
    (on of which is date). The web services sources the data from a sql
    server database and thru ASP.net to the Flex application. I've been
    seeing strange things. During testing, database records such as
    "8/27/2008 8:58:00 PM " correctly shows up as 8/27/2008 in the Flex
    application, but records after 9PM such as "8/27/2008 9:01:21 PM"
    shows up as 8/28/2008 (the next days) .. seems like after 9 throws
    off the data rendering.. please suggest.

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - Handling service results:
    Flex interprets the XML data that a web service or HTTP
    service returns to ..... a DataGrid control with DataTable data
    returned from a .NET web service.
    Link:
    http://livedocs.adobe.com/flex/3/html/data_access_6.html
    Flex cookbook beta - Building Flex Applications with SOAP Web
    Services:
    Mar 3, 2008 ... If you are using web services technologies
    then it is usually ... The DataGrid tag instanciates an instance of
    the DataGrid Flex control.
    Link:
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=7863
    Flex 3 - Using WebService components:
    The Flex web service API generally supports Simple Object
    Access Protocol (SOAP) ... property of a DataGrid control and
    displayed in the DataGrid control.
    Link:
    http://livedocs.adobe.com/flex/3/html/data_access_3.html
    Adobe - Flex General Discussion:
    Flex datagrid data column / webservice - justneed2know -
    08/27/2008 ... I use a web service to populate a datagrid and its
    columns (on of which is date).
    Link:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1388794&enterthread=y
    All Classes (Flex 3):
    mx.rpc.soap, AbstractWebService is an abstract base class for
    implementations that provide RPC access to SOAP-based web services.
    Link:
    http://livedocs.adobe.com/flex/3/langref/class-summary.html
    Adobe - Developer Center : Using Flex Builder to Create Web:
    Using Flex Builder to Create Web ServiceBased Flex
    Applications ... The web service result data needs to flow to the
    DataGrid. Select the 'Data will flow
    Link:
    http://www.adobe.com/devnet/flex/articles/flexbuilder_ws_04.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • 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

Maybe you are looking for

  • What's wrong with my AirPort Express?

    I got my AirPort Express over little a year ago and it worked great. About 3 months ago it died (no light at all). I tried to reset, but it didn't worked. I plugged my old TP-LINK back, and used it about 3 weeks and I didn't touched my AE. After 3 we

  • Multi-value parameter with IN statement

    Hi. I have a ssrs report with a single selection "Car" parameter. The parameter Label and Values are as follows: Label   Value Ford     Ford, Ford Fiesta, Ford Van Skoda  Skoda, Skoda Sport Fiat      Fiat Panda, Fiat Sports Wagon I need to pass throu

  • What is GCLI and how to remove it?

    A bar involving GCLI recently appeared at the bottom of the browser. How do you remove it?

  • Battery not measured correctly

    Hello, I've recently replaced my NB500's battery with a new one. The new battery keeps the laptop running for over 3.5 hours, but the remaining capacity isn't read correctly by windows and because of that, the computer shuts down before windows even

  • Operation on device '\\.\Tape0' exceeded retry count.

    Hi Everyone... i have setup VMWare Server 2.0 and one of the guest is hosting MS SQL 2008 R2. i added a pass-through device for the Tape0. But when i try to read the tape headers i keep getting the following error.... Operation on device ' .\Tape0' e