Usage of dataGrid

Hi,
I am new to JSF. I need to add drop down(comboBox) in odc:dataGrid column. How can i do that?
Is there any option to change the border color of dataGrid?
Senthil

Thanks for the reply,
I am using the following code
<odc:dataGrid pageSize="5" styleClass="dataGrid" showSelectionColumn="true" multiSelection="true" id="dataGrid" navBarPosition="0"><h:selectOneMenu styleClass="selectOneMenu" id="dataGridmenu1"></h:selectOneMenu>
                    <odc:clientBinder value="#{pc_DataGrid.department.employee}"></odc:clientBinder>
                    <odc:dataGridCol attributeName="division" readOnly="true" colHead="Division"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="accountName" readOnly="true" colHead="Account Name"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="contractNo" readOnly="true" colHead="Contract No."></odc:dataGridCol>
                    <odc:dataGridCol attributeName="effectiveDate" readOnly="true" colHead="Effective Date"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="expirationDate" readOnly="true" colHead="Expiration Date"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="billingEntity" readOnly="true" colHead="Billing Entity" underline="true"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="adjustmentEntity" readOnly="true" colHead="Adjustment Entity"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="bookingDivision" readOnly="true" colHead="Booking Division"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="creditedDivision" readOnly="true" colHead="Credited Division"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="region" readOnly="true" colHead="Region"></odc:dataGridCol>
                    <odc:dataGridCol attributeName="valuationMonth" readOnly="true" colHead="Valuation Month"></odc:dataGridCol>In this code for attributeName="region" column i need drop down list with a list of names....Can anyone give me example?
Thanks
Senthil

Similar Messages

  • Finding out if any modifications are being made in the fields in an editable datagrid

    Hi,
    I populated my data grid with an array
    collection(initDG=event.result.categorydtls.category) where
    initDGObject is the array collection.I made the data grid as
    editable.Now , when the user click's on submit(below data grid),
    the request for modifying the corresponding details in database
    should go only if the user makes any modification ,or else an alert
    should be shown saying that "you havent made any modifications".For
    this purpose i assigned "event.result.categorydtls.category" to
    another array collection initDGObject and ,in the function which
    will be invoked after clicking on submit i compared both the
    objects initDG and initDGObject.But to my surprise,if any field in
    data grid is modified then both initDG and intiDGObject(here let me
    remind that i assigned initDG as the data provider for grid and
    initDGObject is a normal array collection object for which the
    details are assigned to for comparison purpose) are also
    modifying.So i am unable to check if any modifications are being
    made before forwarding request for database modification to back
    end.Please suggest me a solution for doing this task.Thanks in
    advance.

    lam not able to add a single object to the array
    collection.Regarding the usage of datagrid in my task,there will be
    a drop down on the top of datagrid with categories(like
    science,maths...)in it.Whenever a particular category is selected
    then the corresponding subcategories(in category science sub
    categories are physics,biology.....)details will be populated in
    the datagrid.Please suggest me a solution.

  • How to stop or reduce the RAM usage as the Wpf Datagrid is Continuosly being updated by background Worker?

    Hi,
    I am developing a packet sniffer application, I am getting a packets from adapter and am updating the information in the Wpf Datagrid using a Background worker. it is a continuous process. So if run this application for hours, after 5 or 6 hours I am getting
    a "Sytem.OutofMemoryException" as the RAM being full. Now my requirement is, the usage of RAM should have a some limit(suppose 750MB) for my application, once application reaches this, the usage of RAM should not increase and at the same time I should
    not get "OutofmemoryException". I mean application should free cached memory of starting Rows of DataGrid, means I should not display the initial Rows and I should display the latest entries. how can I achieve this?
    thanks,
    EDIT:
    Here I am using DataGrid.Items.Add() method to add the entries into the datagrid.
    How can I change my code to Observablecollection items now?

    You could remove entries from the ItemsSource collection of the DataGrid once the number of items reaches a certain threshold of items.
    If you for example use an ObservableCollection<T> as the ItemsSource of the DataGrid you could handle its CollectionChanged event and remove the oldest item when there are a total of say over 5000 (you may of course increase this value in your
    partiuclar application of you require to be able to display more than 5000 items in the DataGrid) items in it. This will make sure that there will never by any more than 5000 items kept in memory:
    const int MaxCount = 5000;
    public MainWindow()
    InitializeComponent();
    ObservableCollection<string> collection = new ObservableCollection<string>();
    collection.CollectionChanged += (ss, ee) =>
    if (collection.Count > MaxCount)
    collection.RemoveAt(0);
    yourDataGrid.ItemsSource = collection;
    Since there is no good way to determine exactly how much physical memory the objects in the ObservableCollection<T> occupy so you better choose a maximum
    number of items to be kept in memory (like MaxCount = 5000 in the sample code above) and then remove the oldest one when the number of items reach this maximum.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question.

  • 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 ?

  • Selection issue with editable Spark DataGrid

    Hi everyone,
    I am evaluating the new Spark DataGrid and I'm having a very strange issue with the behavior of selection in an editable instance.
    Here is my test application: http://www.playcalliope.com/flex/DataGridSelectionIssue.html (code here: https://gist.github.com/1129160)
    And here are the steps to reproduce the issue:
    select the very first cell at the top-left corner of the grid (the one with "Gabriele");
    click on it once more, the editor appears;
    now click on the cell just to the right of it (the one with "Genta").
    You should see that editing ends as it supposed to do, but selection is placed on the third cell (the one with a 5 in it) instead on the one you clicked on. Playing a little with the grid you should see that this isn't the only case, but selection is really behaving randomly.
    I am using SDK 4.5.1.21328.
    I think this is a very basic usage case.. I can't believe this is not working properly, what am I missing?
    Thanks a lot,
    Gabriele Genta
    Message was edited to add live example

    Your running into a known bug, https://bugs.adobe.com/jira/browse/SDK-30088.
    The  bug will be fixed in the Mega release. To work around the bug you can  create a custom editor and remove the  "dataGrid.validateNow();" call in  DataGridEditor.save().
    Here's how I modified your example to workaround the bug:
    <?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"
                   backgroundColor="#E7E7E7"
                   creationComplete="application1_creationCompleteHandler(event)">
        <s:layout>
            <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle"/>
        </s:layout>
        <fx:Script>
            <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    testGrid.dataProvider = new XMLListCollection(testData.item);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:XML id="testData" xmlns="">
                <items>
                    <item>
                        <id>1</id>
                        <cognome>Gabriele</cognome>
                        <nome>Genta</nome>
                        <uhm>5</uhm>
                        <bene>molto</bene>
                    </item>
                    <item>
                        <id>10</id>
                        <cognome>Pinco</cognome>
                        <nome>Pallino</nome>
                        <uhm>10</uhm>
                        <bene>poco</bene>
                    </item>
                </items>
            </fx:XML>
            <fx:Component className="MyDefaultEditor">
                <s:DefaultGridItemEditor>
                    <fx:Script>
                        <![CDATA[
                            import mx.collections.ICollectionView;
                            import mx.collections.ISort;
                            override public function save():Boolean
                                if (!validate())
                                    return false;
                                var newData:Object = value;
                                var property:String = column.dataField;
                                var data:Object = data;
                                var typeInfo:String = "";
                                for each(var variable:XML in describeType(data).variable)
                                    if (property == [email protected]())
                                        typeInfo = [email protected]();
                                        break;
                                if (typeInfo == "String")
                                    if (!(newData is String))
                                        newData = newData.toString();
                                else if (typeInfo == "uint")
                                    if (!(newData is uint))
                                        newData = uint(newData);
                                else if (typeInfo == "int")
                                    if (!(newData is int))
                                        newData = int(newData);
                                else if (typeInfo == "Number")
                                    if (!(newData is Number))
                                        newData = Number(newData);
                                else if (typeInfo == "Boolean")
                                    if (!(newData is Boolean))
                                        var strNewData:String = newData.toString();
                                        if (strNewData)
                                            newData = (strNewData.toLowerCase() == "true") ? true : false;
                                if (property && data[property] !== newData)
                                    // If the data is sorted, turn off the sort for the edited data.
                                    var sort:ISort = null;
                                    if (dataGrid.dataProvider is ICollectionView)
                                        var dataProvider:ICollectionView = ICollectionView(dataGrid.dataProvider);
                                        if (dataProvider.sort)
                                            sort = dataProvider.sort;
                                            dataProvider.sort = null;
                                    var oldData:Object = data[property];
                                    data[property] = newData;
                                    dataGrid.dataProvider.itemUpdated(data, property, oldData, newData);
                                    // Restore the sort. The data will not be sorted due to this change.
                                    if (sort)
                                        ICollectionView(dataGrid.dataProvider).sort = sort;
                                return true;
                        ]]>
                    </fx:Script>               
                </s:DefaultGridItemEditor>
            </fx:Component>
        </fx:Declarations>
        <s:DataGrid id="testGrid" width="100%" height="100%"
                    editable="true" selectionMode="singleCell"
                    itemEditor="{new ClassFactory(MyDefaultEditor)}">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn headerText="Prova" dataField="cognome"/>
                    <s:GridColumn headerText="Prova1" dataField="nome"/>
                    <s:GridColumn headerText="Prova3" dataField="uhm"/>
                    <s:GridColumn headerText="Prova4" dataField="bene"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>
    </s:Application>

  • Update Datagrid without refreshing

    Hi everyone!
    Is there a way to refresh a datagrid without clicking a button or refreshing the page if a new entry was inserted into the database.
    Example:
    A new name is inserted in the database, my datagrid will automatically update, it's like real time in updating.
    thank you very much!

    re-Flexing wrote:
    Hi everyone!
    Is there a way to refresh a datagrid without clicking a button or refreshing the page if a new entry was inserted into the database.
    Example:
    A new name is inserted in the database, my datagrid will automatically update, it's like real time in updating.
    thank you very much!
    what kind of project are you going to be including it in?
    commerical? personal?
    or are you just messing around with code?
    messing around/personal usage, i'd suggest a script acting on a timer request to check the database for any new entries.
    with a fully commerical project, you'd have to go the route of developing your own system with the implementation of a send/listener procedure, or as already mentioned, buy a pre-built one.

  • DataGrid high rate insert rows

    Hi everyone,
    I'm working in a project where we have a high rate messages (like 2-3k per second) . We use Java on server side, BlazeDS and Flex.
    We have a problem on flex side, the messages are insert on a DataGrid where we just show the last 1k messages, after the 100k messages passed through to the application, the datagrid start to refresh slower than before.
    Do you know how can i solve this problem?
    I executed the profiler and i saw that we don't have memory leaks
    Thanks in advance.

    sorry if i sound dense but i am picking up on the phrase "but i never tried to increase the rate "
    i don't know anything about your architecture but are you cramming data back in some forced rate ?  are you force streaming ? what exactly are you doing  !!
    that poor flash player sounds overwhelmed.
    Date: Thu, 28 Apr 2011 10:05:12 -0600
    From: [email protected]
    To: [email protected]
    Subject: DataGrid high rate insert rows
    There are 7 columns and the messages are around 200 bytes each, this means that the 200 bytes are split in the 7 columns.
    Those messages are encapsulated in an object Message inside of which there are MessageFields that have two properties, tag and value.
    Initially i sent 2.5k message per second but i never tried to increase the rate while the message were been delivered, when i resolve this issue i am going to try that.
    At the begin (with 2.5k per sec) the refresh rate is quite good (almost realtime), i mean that the datagrid refreshes the sequence number of the messages really fast, each second i saw the sequence number increase in 2.5k.
    After the first minute the datagrid starts to collapse and it refreshes every few seconds, like 5 seconds for example, and once its refreshed the sequence number increases in 5 * 2.5k, so the message are coming at the rate.
    Regarding the use of cpu i underestimated that point, i was focus on the memory usage but i've showed that flash plugin recently it's between the first 3rd process and sometime took the 1st place.
    How i can reduce the use of cpu?
    >

  • Datagrid without cahe?

    Hello to all...
    Short:
    The datagrid (and advanced datagrid) are optimized for identical "widgets" in each column.  I would like to use a table layout without this feature.  Does something like that exist.
    Long:
    If you think of an excel spreadsheet you will recognize 2 usages of it.  Some sheets have long columns of identically formated numbers.  Some sheets have diferent types of content in each cell of the columns.  I realize that datagrid, (and the related advanced datagrid) are optimized for the first type of "sheet" in that they cache the drawing widgets and reuse them...  I was wondering if there was a "grid" that was not so optimized, so that I can use it for the second type of sheet?
    Thanks for taking the time to read this....
    Jerry Westrick

    "myDG.showHeaders" property.
    Tracy

  • CPU/memory usage of AIR application under Mac 10.4.10

    As my AIR application uses a lot of CPU/memory under Mac
    (seems better in Windows), I decide to do some basic testing. I
    create several applications with different level of complexities.
    Below is a table of CPU/memory usage when the application is simply
    sitting there. A brief description of the application can be found
    in the end of each line.
    Here are some results:
    [1] Even for an empty application, CPU usage is not zero
    (most non-AIR application has 0 CPU usage when doing nothing). Also
    the memory usage is huge, comparable to Finder on my computer.
    [2] Empty application has 7 threads running.
    [3] Indetermined progress bar costs a lot of CPU; and I guess
    any other animation costs a lot of CPU too. But if they are
    invisible they are fine.
    [4] running timer costs CPU.
    PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE
    VSIZE application
    10093 adl 1.8% 0:01.85 7 100 292 15.0M 13.8M+ 22.8M 444M
    empty
    10094 adl 1.9% 0:01.55 7 100 299 15.2M 14.0M+ 23.1M 444M
    label
    10097 adl 1.9% 0:01.48 7 100 302 15.3M 13.4M 23.7M 445M
    progress bar
    10095 adl 5.7% 0:02.40 7 100 302 15.4M- 13.2M 23.5M 445M
    progress bar (indetermined)
    10125 adl 15.9% 0:03.66 7 100 304 15.7M- 13.4M 23.9M 445M 5
    progress bar (indetermined)
    10126 adl 29.7% 0:10.39 7 100 325 16.7M+ 13.4M+ 24.9M+ 445M
    10 progress bar (indetermined)
    10128 adl 1.9% 0:01.34 7 100 324 16.1M 13.7M 24.3M 445M 10
    progress bar (indetermined), visible=false
    10136 adl 1.8% 0:00.76 7 100 323 16.5M+ 13.9M+ 24.7M- 450M
    Empty datagrid
    10147 adl 1.9% 0:01.60 7 101 328 16.1M 13.8M+ 24.5M- 447M
    TabNavigator with two empty VBox children
    10138 adl 1.8% 0:01.59 7 100 372 19.4M 13.9M 27.7M 453M
    datagrid with 10000 simple rows
    10131 adl 3.1% 0:02.38 7 110 348 25.7M 19.3M 34.8M 458M 10
    Empty native windows
    10143 adl 1.9% 0:00.99 7 100 296 15.1M 13.9M+ 23.2M- 444M
    Timer, delay = 100ms, calling an empty function
    10145 adl 4.1% 0:02.35 7 100 298 15.0M 14.0M+ 23.2M- 444M
    Timer, delay = 100ms, calling function update label position
    As to my own application, it's much bigger than these simple
    ones. The CPU usually stablizes to 20% and VSIZE is about 1G. There
    is no timer running. When I leave the application open for a few
    hours, the application will eventually freeze and I have to kill
    it.
    I am wondering if there are any articles or documents
    explaining AIR's CPU/memory usage. And also if AIR is planning to
    improve the performance in the next release.

    James, thank you for the very fast answer! I did various tests on the weekend on my computer and computer of my friend.
    And I can say, that Debug flag doesn't affect memory consumption.   They still eat memory. My steps to reproduce are as follows:
    (Windows 7 32 bit)
    Photoshop CS5:
    1) set HKEY_CURRENT_USER\Software\Adobe\CSXS2Preferences\PlayerDebugMode to 0
    2*) check HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\CSXS2Preferences (just in case)
    3) Compile HelloPhotoshop example to ZXP and install via  Extension manager
    4) restart computer
    5) Run Photoshop CS5 - Memory consumption: 100 096 KB
    6) Open HelloPhotoshop and close it 10 times
    7) Memory consumption: 155 840 - 5,574 MB per one close/open
    Maybe a garbage collector is expected to run and free this memory, but it never happened in my case. The memory pool was increasing to 1 GB when I was working with one of my panels - with no documents open in Photoshop
    In InDesign I tried the same thing with HelloInDesign ( I had to close the panel completely and then open with Window | Extensions | HelloInDesign)
    Memory consumption on start: 118 516
    Memory consumption after 10 open/close cycles: 197 516
    It's 7,9 MB per one close/open
    It's the simpliest panel test. When I'm using AIR libraries the memory usage is increasing a lot faster.

  • ItemRenderers in DataGrids

    Hi All,
    I have doubt regarding the usage of itemRenderers in
    DataGrids.I have used the below part of the code in my application.
    <mx:DataGridColumn headerText="Button" width="38"
    dataField="col1" >
    <mx:itemRenderer>
    <mx:Component>
    <mx:Checkbox label="Add" height="19" styleName="check1"
    id="btn"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    1. In the above code,even I have given the styleName property
    for checkbox tag ,its not affecting the checkbox.But when I specify
    those properties seperately,it's affecting the checkbox.
    The styleName I have used is styleName = "check1" which I
    have mentioned in the centralised css file as
    .check1{
    fillColors :#37951D,#37951D;
    cornerRadius : 0 ;
    color: #ffffff ;
    disabledColor : #37951D ;
    textRollOverColor : #ffffff ;
    2.Also,if I try to give an id for <mx:CheckBox> tag,
    its showing an error like " id attribute is not allowed on the root
    tag of a component".Isn't possible to give id for itemrenderer
    components.
    3.How can I get/retrieve the values of perticular column in
    datagrid.Is there any command to retieve values of columns in
    datagrid. Here my problem is I have to check whether checkbox is
    checked or not to do some operations.
    Anyone help me out in solving these issues.
    Regards,
    Lalitha

    > The RichTextEditor is a Halo component, and RichText is a spark component so with similar names
    The new Spark "text primitives" are SimpleText, RichText, and RichEditableText. This nomenclature may create some confusion with the old Halo RichTextEditor, but after lots of discussions we felt they were the best names to describe what they do, and we wanted the best names going forward. RichTextEditor, like other Halo components, will at some point become obsolete when the Spark component set is complete.
    > it seems that RichText would have an easy html method like RichTextEditor
    The richness that RichText and RichEditableText is that of TLF, the new Text Layout Framework. TLF has a markup language that is similar to XHTML, but in TLF the primary representation of rich text isn't markup. Instead, it's a tree of ActionScript objects such as DivElements, ParagraphElements, and SpanElements. The root of this tree is an object known as a TextFlow.
    Therefore in the latest trunk builds of Gumbo, RichText and RichEditableText expose a 'textFlow' property which you set to a TextFlow. If you have markup as a String or as XML, there is now a utility class called TextFlowUtil for converting the markup to and from a TextFlow. A TextFlow is very powerful because you can access its parts as ActionScript objects and change them at runtime.
    Halo components did not have an object-oriented model of rich text, so they just exposed the htmlText:String property, which is not as powerful when you want to change just part of a long document.
    > is there an easy way of loading RichTextEditor html/rich text into a textarea
    Doesn't myTextArea.htmlText = myRichTextEditor.htmlText do what you want?
    Gordon Smith
    Adobe Flex SDK Team

  • Is it possible to recognize and enter value in to a specific cell of a specific row in WPF Datagrid , in Testing?

    Hi,
        I am develop one sample application in that application I am using DataGrid. with this DataGrid I am facing one problem i.e; I want to recognize a specific cell(Like: 2nd row 3rd column in this cell i will enter any value) and enter values
    into that cell. But i don't know how to recognize particular cell and enter the value . Is it possible ? if possible please guide me.
    NOTE: I am facing this problem in Unit Testing?
    Regards,
    Bhadram.

    Hi,
    What you are looking for might be done with the usage of a boolean variable and some if conditions. However, you can not use datacopy command inside if conditions. I would be the world's happiest person if there was something like conditional data copying, sorry.
    If you choose to use if conditions you might end up using equations for copying data from one scenario to other. This is of course a case which might take ages to calculate.
    Instead, I suggest you to have two seperate business rules for each cases.
    Cheers,
    Alp

  • DataGrid.itemRenderer Property problem

    Hi newbie to AS3:
    I have a DataGrid built dynamically with AS3 where
    I need to change the color of a certain row.
    I tried the following code but Its usage is certainly wrong:
    cDtgc1.itemRenderer = cDtgc1.getItemRendererFactory(false,
    BackgroundComp);
    BackgroundComp is a class included is the code below.
    How do I use this factory? The way I have it it is not
    executing
    Thanks.
    Text

    try:
    cDtgc1.itemRenderer = new ClassFactory(BackgroundComp );
    for some alternatives try this:
    http://weblogs.macromedia.com/pent/archives/2007/02/coloring_the_ba.html
    ATTA

  • Displaying different data in datagrid cells using a cellrenderer?

    Gidday guys
    I'm populating a datagrid using SQLite. Some SQL columns contain 1 or 0 as booleans, and I want to display this as a bullet point in my datagrid.
    Currently I have a conditional that checks for a 1, and if found, displays the bullet point. I figure there must be a better way, but am unsure how to do this with cellrenderers. I get how to add components using cellrenderers, but is there a way to replace the cell display with another character (without actually changing the data of the dataprovider) ?
    Cheers for taking a look.

    It would be better performance to draw a simple shape rather than a TextField with a single character in it. To do so, yes you'd need to override the cell renderer. I often choose the latter but usually use GPU-driven components like FeathersUI components.
    If you have an excessively large amount of data and/or are on a device and want to do this because you're getting poor performance, that's a good usage of your time. Also if you just want to learn how to do it just to do it, that's can also be a good usage, if you complete your work on time. However if it's for desktop and/or the data is pretty minimal (few dozen rows up to a hundred or so, with a nominal amount of columns), it's probably not worth your time.
    I'm sure you have this link but:
    http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65b32-7fd4.html
    All component cellrenderers tend to be the same (because larger components use smaller components and the architecture lines up). The difference is in making sure your renderer supports the data it's provided. If you need only a TextField and/or a bullet, that's pretty easy. Most components (like lists) support icons and you'll need to make sure you provide the complete implementation of all data scenarios in your cellrenderer.
    Pay attention to cell dequeue techniques on some components. If all cells commonly have only text, cells aren't destroyed and recreated as the list scrolls. The data is resent to the cell and the cell has a chance to simply update itself rather than recreate itself from scratch. This offers a big performance increase not having to destroy and recreate needlessly. It can also really confuse people when cells start appearing empty as you scroll (because the cell construction methods aren't run). 

  • Cyclically changing label in datagrid

    I am a flex newbie, so excuse me :)
    I have created an MXML component which extends from Label.
    The purpose is as follows. It will be used as an itemrenderer in a
    DataGrid to cycle through multiple values. This is controlled by
    the texts property
    If texts has a single value, the
    label text will remain
    If texts has more than a single
    value, each of the values will appear and then disappear
    All multilabels will cycle their text
    synchronously, ie. they all share the same effect
    The concept works well in general, but when the data of the
    grid changes (rows can get inserted, added, deleted etc), I get all
    kinds of problems
    Some labels disappear
    Some labels appear twice
    The typical usage scenario is :
    MultiLabel.clearAll();
    // code to update the data grids model
    MultiLabel.startAll();
    Can someone tell me what I am doing wrong? Or, is there a
    better way to do this?

    "flexgent" <[email protected]> wrote in
    message
    news:g7pcpt$9t3$[email protected]..
    >I am a flex newbie, so excuse me :)
    >
    > I have created an MXML component which extends from
    Label. The purpose is
    > as
    > follows. It will be used as an itemrenderer in a
    DataGrid to cycle through
    > multiple values. This is controlled by the texts
    property
    >
    >
    If texts has a single value, the
    label text will remain
    >
    If texts has more than a single
    value, each of the values will
    > appear
    > and then disappear
    >
    All multilabels will cycle their text
    synchronously, ie. they all
    > share the same effect
    >
    > The concept works well in general, but when the data of
    the grid changes
    > (rows
    > can get inserted, added, deleted etc), I get all kinds
    of problems
    >
    >
    Some labels disappear
    >
    Some labels appear twice
    >
    > The typical usage scenario is :
    >
    > MultiLabel.clearAll();
    > // code to update the data grids model
    > MultiLabel.startAll();
    >
    > Can someone tell me what I am doing wrong? Or, is there
    a better way to do
    > this?
    I don't see anything in your itemRenderer code that reacts to
    a change in
    data or listData.
    http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
    http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende.html

  • CFFORM and HIGH CPU USAGE

    Dear Friends
    I write my new forms using CFFORM and format=flash it have a
    DATAGRIDE bind to a 3 tab form (add, edit and delete) and its
    working very nice but when even a single user run the page the CPU
    usage on the server suddenly jump to over 90% and I'm really scared
    to launch it live, does any body has any suggestion?
    Its a MX7 (7.0.1) Enterprise version running on a 4 CPU
    Windows 2000 Server (SP3) with IIS 5, I already installed all
    latest updates and hot fixes.

    "Does the instance with the high counts receive more traffic than the other instances? Is it possible that the load balancer not
    working the way it should be?"
    How can I get that information? I can't see metrics for a specific instance
    "Does it always happen to the first instance?"
    I will check it better, but in the order given by the Processes panel it's the second instance which has the issue. The scaling is at 2 instances for the most part of the time (it's the minimum).
    Maybe one time it was the 3th instance but I'm not sure, I'll give it more attention.
    " How long do these moment last?"
    The time can be 10 to 30 minutes, but I fix it as soon as I see the problem. It's not the down-scaling to resolve it because in these situations the CPU as well is high so the scaling holds or increases the number of instances.
    "- How often do these moments occurs?"
    It occurs quite often, 2/4 times a week.

Maybe you are looking for