DateFormatter and a DataGrid control

Confuised a bit here. I have a DateFormatter function I want to work with a datagrid control. I can use this function in other areas of the model without any problem. I can't do it to format the data in the datagrid control. So far, that's what I have:

the action script that calls the trainer.
public void formatDate(date:Date):String
{
if(date!=)
{
Return KDLDateFormat.format (date);
} else {}
return ";
}
}

<! - my format string - >
< mx:DateFormatter id = "KDLDateFormat" formatString = "DD-MMM-YYYY" / >

<!-the grid data itself. ->
< mx:DataGrid id = "dependantGrid" width = "460" left = "10" top = "10" height = "155" dataProvider = "{myDepData_Obj}" >

<!-the column I want formatted->
< mx:DataGridColumn dataField = "Dep_DOB" headerText = "Date of birth" labelFunction = "{format ()}" / > "


This is the error message I get when I try to run the data grid. By the way... If I take the labelfunction I get the correct datetimestamp value in the datagrid.

ArgumentError: Error #1063: incompatibility of County of Argument on components::DepInfo / format (). 1 EXPECTED, got 2.
at mx.controls.dataGridClasses::DataGridColumn/itemToLabel()
at mx.controls::DataGrid/::setupRendererFromData()
at mx.controls::DataGrid/mx.controls:DataGrid::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/::validateProperties()
at mx.managers::LayoutManager/::doPhasedInstantiation()
function / http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()

I tried to use it instead of the column and it worked up to a point. I want the date in the format DD-MMM-YYYY and it gave me the DD/MM/YYYY, but it worked.

< mx:DataGridColumn dataField = "Dep_DOB" headerText = "DOB1" >
< mx:itemRenderer >
< mx:Component >
< mx:Text text = "{(data. Dep_DOB. GetMonth () + 1) + "/" + (data. Dep_DOB. GETDATE()) + ' / ' + data. Dep_DOB.getFullY ear()} "/ >"
< / mx:Component >
< / mx:itemRenderer >
< / mx:DataGridColumn >


Thanks in advance for the help!

KomputerMan ~ |  :-)

The problem is in the function labelfunction of dataGridColumn is referring, the signature is wrong. Function of a labelFunction should have this signature:

labelFunction(item:Object,_column:DataGridColumn):String

If yours will be like this:
public void formatDate(item:Object,_column:DataGridColumn):String
{
{if(date!=)}
Return KDLDateFormat.format (order of the day. Dep_DOB);
}
else {}
return ";
}
}

You must also remove the data from your DataGridColumn definition area, you cannot have a labelFunction and a dataField, cause both determine the content of the column, you must use only one. Finally if you use the labelFunction you do not use {} or (), just the name of the function. It should be like this:

This should work, tell me if something goes wrong

Tags: Flex

Similar Questions

  • How to add a padding lines spark and mx datagrid

    Hi all

    I want to add the top and lower padding in each line of the spark and mx datagrid control.

    Please help me how do.

    I think that in Spark you add padding in the rendering engine.  In mx, you should bea wheat

    to set paddingTop/paddingBottom styles.

  • Change the color of an individual cell after editing in a datagrid control

    Hi all, I have tried with the custom converter but its either change the entire grid or the entire column. Is it possible to solve this problem by applying the element converter to a particular area? Help needed please...


    Thanks in advance

    I did a bit of work on this and discovered some things that make it a little hard.

    Let's start with the application and the DataGrid control. You will need to know whether or not the currently edited cell value has changed. To do this, I created a variable called oldValue. I then added two event handlers for the DataGrid control:

    itemEditBeginning = "rememberValue (event)" "
    itemEditEnd = "markCell (event)" "

    In the rememberValue function, I copied the value in the cell for the oldValue:

    private function rememberValue (event: DataGridEvent): void
    {
    oldValue = dp [event.rowIndex] [event.dataField];
    }

    In markCell, I have determined if the value has changed. If so, I placed his index of row/column on a list or I removed it from the list:

    private function markCell (event: DataGridEvent): void
    {
    If (event.reason == DataGridEventReason.CANCELLED) {}
    return;
    }

    var newValue:String =
    TextInput (event.currentTarget.itemEditorInstance) .text;

    If (oldValue! = Number (newValue)) {}
    HilightEditedCellRenderer.addCell (event.rowIndex, event.columnIndex);
    } else {}
    HilightEditedCellRenderer.removeCell (event.rowIndex, event.columnIndex);
    }
    }

    HilightEditedCellRenderer is the itemRenderer to my cells. AddCell and removeCell functions are static members of the cell.

    In the HilightEditedCellRenderer, I created an ArrayCollection collection to contain the list of cells and the following functions:

    public static var editedCells:ArrayCollection = new ArrayCollection();

    isEditedCell determines if the row/column is in the collection editedCells.

    public static void isEditedCell (rowIndex:Number, columnIndex:Number): int
    {
    for (var j: int = 0; j< editedcells.length;="">
    {
    If (rowIndex == editedCells [j] .rowIndex & columnIndex == .columnIndex editedCells [j])
    {
    return j;
    }
    }

    Returns - 1;
    }

    removeCell deletes the row/column index within the collection of editedCells pair
    public static void removeCell (rowIndex:Number, columnIndex:Number): void
    {
    determine whether the cell is already on the list and if so, remove it
    var int index = isEditedCell (rowIndex, columnIndex);
    If (index > = 0) {}
    editedCells.removeItemAt (index);
    }
    }

    Add cell place the row/column pair in the Collection if they are not already:
    public static void addCell (rowIndex:Number, columnIndex:Number): void
    {
    Make sure that the cell does not exist yet - don't want to add twice
    If (isEditedCell (rowIndex, columnIndex)< 0="" )="">
    editedCells.addItem ({rowIndex:rowIndex, columnIndex:columnIndex});})
    }
    }
    Finally, I replace the data set function to change the color:

    override public function set data(value:Object):void
    {
    Super.Data = value;

    If (listData)
    {
    Determine the first visible line and a visible column

    var firstRow:Number = .verticalScrollPosition (listData.owner as DataGrid);
    var firstCol:Number = .horizontalScrollPosition (listData.owner as DataGrid);

    the listData.rowIndex is 1-based (not zero) and is based on the visible line. So, if
    the first visible row is 12 and the second row on the screen has changed, then
    listData.rowIndex will be 2. To fix this, is subtracted 1 and firstRow is added.
    A similar thing is done for the columnIndex (what is zero-based).

    var int index = isEditedCell (listData.rowIndex - 1, listData.columnIndex + firstRow and firstCol);

    Determine the color of the cell

    If (index > = 0)
    {
    setStyle ("color", 0xff0000);
    }
    else {}
    setStyle ("color", 0x000000);
    }
    }
    }

    I hope this helps.

  • Question about Drag and Drop using DataGrid controls

    I use two DataGrids, each has a different type of object so that you can imagine when you drag - move into the other it causes an error in the cause the objects are not the same.
    I already managed to do this work, on the dragDrop event, I stop the default behavior of the event by the preventDefault () method, this way I can convert manually one object in another and then add it to the target of DataGrid.
    The problem is that because I stopped the default behavior of the event that remains the target DataGrid highlighted all the time (focus is on that point), so I have to do after my manual conversion object is to restore the DataGrid control to its normal state, which is what would have made the event's default behavior.

    So any ideas how to do that? restore the DataGrid control in its normal state? or perhaps restore an event so that it can continue its default behavior?

    OK I have found, after calling the preventDefault method and make my own logic, you call the method of the DataGrid hideDropFeedback () and that will do the job

  • Problem of filling and creating a dynamic DataGrid control

    Hello

    I have a scenario eventually, and I'm desperate that anyone who reads this message might help me. I have a table in what follows I would use its individual child element as the data in each column.

    I wonder if someone can provide some guidance on how I can do this, because I can't fill in the data, and so he keeps throwing the error unable to create a new column to me.

    Can someone help me please?

    Thanks in advance.

    The code is attached.

    Alice

    "alice_data" wrote in message
    News:gn5fli$20D$1@forums. Macromedia.com...
    > Hi, Amy:
    >
    > I want to say is that I intend to create a DataGrid that contains all the
    > I've specified in dg.columns = ['region_name', 'population',
    [> 'market'];

    The DataGrid columns table must contain column objects, not strings.

    > However, since all values are generated dynamically, I could
    > probably
    > only to add a column to the times, but I want to add all columns to
    > a
    > dataGrid unique instead of create a DataGrid for each of the columns.
    > With my
    > structure current codes, I think that I create something with the individual
    > columns
    > on each of the new dataGrids.

    Each object on the display list can have only one parent. As the saying
    go, you cannot have your cake and eat it, too. Or put in a more
    metaphor of everyday, if you paid your red shoes to Martha, you cannot also
    Wear them. So IFI am you understand, you want to create a
    DataGrid with multiple columns, and then use these columns in several
    DataGrids? It is not possible.

    > Did I do something wrong to try to reach what I wanted to do? With
    > a
    > DataGrid with multiple columns?

    It is quite possible to have several columns in a DataGrid control. It's
    What to do in datagrids. And of course if your code does not achieve what you set
    to do this, it is a problem. It's just very difficult to determine exactly
    where your problem lies.

    You can find this useful example
    http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-DataGrid-contr ol in flex.

  • DateFormatter in advanced Datagrid

    Hi all

    I am trying to format a date field in the advanced datagrid control, but it displays the incorrect date. It displays either 100 or 2000.

    The data from a webservice and I convert data from the Web service in an arraycollection collection and each element of the arraycollection collection is of a custom type. One of the fields of custom type is a date.

    «The data show in the advanced datagrid correctly but a very long form for example"sea Mar 19 15:55:26 GMT + 0000 2008»

    I want to format the date so that it displays only the year, month and date so in DDD/MMM/YYYY format. For this I use a dateFormatter in the Datagrid column advanced in the following way:

    < mx:AdvancedDataGridColumn headerText = "PriceDate" width = "240" dataField = "priceDate" >
    < mx:formatter >
    < mx:DateFormatter formatString = "DD/MMM/YYYY" / >
    < / mx:formatter >
    < / mx:AdvancedDataGridColumn >


    I of course expect to see "March 19, 2008", but instead, I get "19 March 2000".»

    If you can solve it for me or suggest another way, it would be much appreciated.

    Best regards

    This was solved by using the labelfunction property instead. I don't know why, using a DateFormatter in the Advanceddatagridcolumn has failed - it looks like a bug.

    But the solution is to have the datagridcolumn as:

    and have a DateFormatter on its own in the mxml as in:


    labelFunction = "date_labelFunc" / >

    and the labelfunction should look like:

    private void date_labelFunc(item:Object,_column:AdvancedDataGridColumn):String {}
    Return dateFormatter.format (item.priceDate);
    }

  • How to clear a selected line of the datagrid control in flex 4

    Hi friends,

    I have a datagrid and a button, delete once I've selected a line of datagrid, then click on Remove button medium it should remove the data grid.

    How to do this.please help.

    No matter what welcome suggession

    Thanks in advance,

    Vegas

    Hello

    For that you call the same function on click of a button. This button is outside your datagrid control.

    public void deleteItem(event:MouseEvent):void {}
    dgArrayCollection.removeItemAt (dg.selectedIndex);
    dgArrayCollection.refresh ();
    }

    Thank you and best regards,

    ---------------------------------------------------------------------- -----------------------------

    Kanchan Ladwani | [email protected] | www.infocepts.com

    ---------------------------------------------------------------------- -----------------------------

  • How to disable the elements (gray out) in the DataGrid control?

    Hello

    I need to implement a component custom for a selectable list with a maximum selected items.

    in other words, when the selected items reached the maximum, all unselected items will be gray outside.

    Now I am able to use the DataGrid control to display a selectable (by itemRenderer) "checkbox" to the first column, to let the user select the item.

    And the name of the list in the second column.

    But I can't find a way to grey out (disable) these no selected item when max is reached.

    Can someone give advice?

    Here is my code snippet:

    SelectableListView.mxml

    < mx:VBox ' xmlns:mx = ' http://www.Adobe.com/2006/MXML " " width ="100%" height = "100%" "visible ="true">

    "" " < mx:DataGrid id ="list_datagrid"dataProvider =" {} {this.stringList}"showHeaders ="false"

    "" "" editable = "false" "selectable ="true"verticalGridLines ="false"borderStyle ="No"alternatingItemColors = '[#F8F8F0, #FFFFFF]"

    "" "" left = "5" rowCount ="16" rowHeight = "20" height ="83" width = "100%"top ="0"doubleClickEnabled = "true" doubleClick ="onDoubleClick (event)" >

    < mx:columns >

    " < mx:DataGridColumn id ="listCheckBox_col"dataField ="selected"editable ="false".

    "itemRenderer ="ListRenderer"width ="18"headerText =" ' resizable ="false" draggable = "false"/ > "

    " < mx:DataGridColumn id ="listName_col"dataField ="name" / >

    < / mx:columns >

    < / mx:DataGrid >

    < / mx:VBox >

    ListRenderer.mxml

    < mx:Canvas ' xmlns:mx = ' http://www.Adobe.com/2006/MXML " " width ="100%" height = "60" > "

    < mx:Script >

              <! [CDATA]

    private function setInUse(): void

                   {

    _data.selected = listInUse.selected;

                   }

    []] >

    < / mx:Script >

    "" " < mx:CheckBox id ="listInUse"width ="18"height ="18"click ="setInUse()"selected =" _data.selected{}"/ > "

    < / mx:Canvas >

    What is listInUse insdie the itemRenderer? I'm not very clear on how you use

    it. However, there are 2 ways to do this. Do not know if data.selected can be used

    to toggle the itemrenderer. I'll so guess not. Have a bindable extra

    "enabled" in your model of dataProvider property. Thus, when you reach the maximum of

    selected items through the collection and defined the set of the activated

    as a result. The enabled property of the renderer is linked to active so model

    It should be updated accordingly. The other way is to bind the license of the

    rendering engine on the selected. But as I said I don't know how your code works...

    HTH,

    C

  • Retrieve data from the datagrid control

    Hi people,

    Currently I'm trying to create a datagrid control that allows the user to see the view of all data. And allow the user to click the data grid and a popup displays a more detailed information data

    But I have some problem to retrieve the id of the data first. I managed to create a click event to allow the user to click a specific popup data and shows.

    I need help regarding this. Thank you

    -ExpertDiscoverySystem.mxml-

    [Bindable]
    public var dataid:String;
    private void onItemClick (e:ListEvent): void {}
    currentState = "SearchName;
    Add here the popup, then try to transfer a certain area to display all necessary data
    titleWindow = PopUpManager.createPopUp (Thi, component. DataDetail, true) as TitleWindow;
    PopUpManager.bringToFront (titleWindow);
    var dataid:String = e.currentTarget.selectedTarget.id;
    }

    < mx:Panel put width = "1169" height = "558" layout = "absolute" title = "Datagrid" x = "48.7" y = '171.65' includeIn 'SearchResult' = >
    < mx:Label horizontalCenter = "0" y = "1" text = 'results '.
    fontSize = "16" fontWeight = "bold" / >
    < mx:DataGrid id = "dgPeeps" width = '1141' height = '487' selectedIndex = '0' showHeaders = 'false' "16.6" = x y = '24' creationComplete = "dgPeeps_creationCompleteHandler (event)" itemClick = "onItemClick (event); "dataProvider ="{getContentForAllResult.lastResult}">
    < mx:columns >
    < mx:DataGridColumn dataField = "img" itemRenderer = "component.image" / >
    < mx:DataGridColumn headerText = "name" dataField = "name" / >
    < mx:DataGridColumn headerText = "Department" dataField = "department" / >
    < mx:DataGridColumn headerText = "expert" dataField = "expert" / >
    < mx:DataGridColumn headerText = "project" dataField = "project" / >
    < mx:DataGridColumn dataField = "id" / >
    < / mx:columns >
    < / mx:DataGrid >
    < / mx:Panel >

    -DataDetail.mxml - the popup component

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:TitleWindow ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" width = "700" height = "600" backgroundColor = "#000000" backgroundAlpha = '0,70' close = "titleWindow_close (event)" xmlns:services = "*" services > "
    < fx:Declarations >
    < s:CallResponder id = "getSpecificResultResult" / >
    < services: ExpertSearchManager id = "expertSearchManager" fault = "Alert.show (event.fault.faultString +"\n"+ event.fault.faultDetail)" showBusyCursor = "true" / > "
    <! - Place non-visual elements (e.g., services, items of value) here - >
    < / fx:Declarations >

    < fx:Script >
    <! [CDATA]
    Import mx.controls.Alert;
    Import mx.core.FlexGlobals;
    Import mx.events.CloseEvent;
    Import mx.events.FlexEvent;
    Import mx.managers.PopUpManager;

    [Bindable]

    private void titleWindow_close(evt:CloseEvent):void {}
    PopUpManager.removePopUp (this)
    }

    protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
    {
    change below with Dynamics
    var dataid:String;
    dataID = FlexGlobals.topLevelApplication.id;
    getSpecificResultResult.token = expertSearchManager.getSpecificResult (dataid);
    }

    []] >
    < / fx:Script >

    < mx:Image x = "10" y = "10" width = "67" height = "67" / >
    < s:Label = "85" x = "10" text = "Label" color = "#FFFFFF" / >
    < s:Label = "125" x = "10" text = "Label" color = "#FFFFFF" / >
    < s:Label = "85" x y = "30" text = "Age" color = "#FFFFFF" / >
    < s:Label = "114" x y = "30" text = "Label" color = "#FFFFFF" / >
    < mx:HRule x = "0" y = "109" width = "697" / >
    < mx:HRule x = "0" y = "256" width = "698" / >
    < mx:VRule = "256" x = "114" height = "141" / >
    < s:Label x = "10" y = "119" text = "Social Networking" color = "#FFFFFF" fontWeight = "bold" fontSize = "14" / >
    < s:Label x = "10" y = "270" text = "Relationship" color = "#FFFFFF" fontWeight = "bold" fontSize = "14" / >
    < s:Label = "270" x = "119" text = 'Skills' color = "#FFFFFF" fontWeight = "bold" fontSize = "14" / >
    < mx:Image = "4" x = "151" source = "images/twitter.gif" width = "85" height = "21" / > "
    < mx:Image = "6" x = "199" source = "images/facebook.jpg" width = "85" height = "21" / > "
    < s:Label = "99" x = "160" text = "Label" color = "#FFFFFF" / >
    < s:Label = "99" x = "208" text = "Label" color = "#FFFFFF" / >
    < mx:DataGrid = "283" x = "376" id = "dataGrid" creationComplete = "dataGrid_creationCompleteHandler (event)" dataProvider = "{getSpecificResultResult.lastResult}" > "
    < mx:columns >
    < mx:DataGridColumn headerText = "id" dataField = "id" / >
    < mx:DataGridColumn headerText = "expert" dataField = "expert" / >
    < mx:DataGridColumn headerText = "project" dataField = "project" / >
    < mx:DataGridColumn headerText = "searchTerm" dataField = "searchTerm" / >
    < mx:DataGridColumn headerText = "searchCriteria" dataField = "searchCriteria" / >
    < mx:DataGridColumn headerText = "Department" dataField = "department" / >
    < mx:DataGridColumn headerText = "name" dataField = "name" / >
    < mx:DataGridColumn headerText = "img" dataField = "img" / >
    < / mx:columns >
    < / mx:DataGrid >

    < / s:TitleWindow >

    It should work fine if you did changes properly. You will see directly the _dataid of the property which you type titleWindow. through code intellisense.

    As because you stated a public variable it must defenitely be accessible for the titleWindow instance. Please cross-check you do not have something wrong.

    Thank you

    Jean Claude

  • Maybe Flex SDK bugs: visible converters element DataGrid control

    Hi all, I'm still a noob to flex, but this seems a little strange to me.

    I tried to hide a converter button in a DataGrid control, but he would just hide.  I was setting visible inside the mxml and also in the class that extends the buttonbut would just hide.  Then, I overloaded the property visible set/get back what was setting the property and found that inside the DataGridBase.as the setupColumnItemRenderer function sets still visible of the renderes to true.

    DataGridBase.as
    protected function setupColumnItemRenderer (c:DataGridColumn, contentHolder:ListBaseContentHolder,
    rowNum:int, colNum:int, uid:String, data: Object): IListItemRenderer
    {
    var listItems:Array = contentHolder.listItems;
    var point: IListItemRenderer;
    var rowData:DataGridListData;

    Item = listItems [rowNum] [colNum];
    If (! point | itemToUID (item.data)! = uid)
    || columnMap [item.name]! = c)
    {
    Item = createColumnItemRenderer (c, false, data);
    If (point == null)
    Returns a null value.
    If (item.parent! = contentHolder)
    contentHolder.addChild (DisplayObject (item));

    a space is used if there is no so text widgets get a default size
    columnMap [item.name] = c;
    If (listItems [rowNum] [colNum])
    addToFreeItemRenderers (listItems [rowNum] [colNum]);
    listItems [rowNum] [colNum] = item;
    }

    [Mat] left in the above block out because
    the element is without a doubt at this stage and still need
    its up-to-date information
    rowData = DataGridListData (makeListData (data, uid, rowNum, c.colNum, c));
    rowMap [item.name] = rowData;
    If (item is IDropInListItemRenderer)
    IDropInListItemRenderer (point) .listData = data? rowData: null;
    Item.Data = data;
    item.Visible = true;

    If (uid & & colNum == 0)
    contentHolder.visibleData [uid] = item;
    return item;
    }

    Why would he do that?  If it should not respect the visible property for the mxml rendering engine already set and not force it to true on init?

    Converters use the visible property to recycling.  Invisible rendering engines are not supported.  The attack detection logic he would find the cell, it belongs to the same if it were invisible.  You can set alpha = 0, but that does not block the attack detection logic.

    Why are you trying to hide a converter?

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Using a DataGrid control to get a RemoteObject

    What I have is a compound of two components. A component is a datagrid control that contains a list of users in it. The other component is just a group of checkboxes.

    Do I have to be able to do is select a user in the DataGrid and the second part, do trigger a RemoteObject call and returns the data about the person I selected in the datagrid control. What I need to know, is how to move selected users ID value to the RemoteObject call? The ID of the selected user is contained in an object called SelUserInfo.UserCnt. This object is sent to the second component when something is selected in the data grid. So far, that's what I have my code...

    My RemoteObject call:
    < mx:RemoteObject id = "getUserSec" destination = "ColdFusion" source = "ISIF. WebServices.Flex.UserData"ShowBusyCursor ="true">
    < mx:method name = "getUserSecRoles" result = "getRolesHandler (event)" >
    < mx:arguments >
    {SelUserInfo.UserCnt} < UserCnt > < / UserCnt >
    < / mx:arguments >
    < / mx:method >
    < / mx:RemoteObject >

    My Manager for the RemoteObject call:
    [Bindable]
    private var userSecRoles:ArrayCollection;

    private void getRolesHandler(event:ResultEvent):void
    {
    userSecRoles = new collection ArrayCollection (event.result as Array);
    }


    My function which is called when a user is selected in the datagrid control:
    public void getUserRoles(): Sub
    {
    getUserSec.getUserSecRoles.send ();
    }

    The problem is that the userSecRoles is always null. Does anyone know if I call the Number correctly?

    Have an ordinary day...
    KomputerMan ~ |  :-)

    Problem was found to be in the order that things were called. I would call the datagrid listener when a user has been selected by using this code:

    [Bindable]
    private var selectedUser2:Object;

    private void userSelHandler2(event:KDL_SelEvent):void
    {
    selectedUser2 = event. KDL_SelObject;
    getUserSec.getUserSecRoles (selectedUser2.UserCnt);
    Roles2TempID.getUserRoles (); initialize checkboxes
    }

    GetUserSec.getUserSecRoles (selectedUser2.UserCnt); line call my RemoteObject that calls the following event handler, to the Office of receiver data in a table.

    [Bindable]
    private var myUserSecRoles:ArrayCollection;

    private void getRolesHandler(event:ResultEvent):void
    {
    myUserSecRoles = new collection ArrayCollection (event.result as Array);
    }

    Problem is that the Roles2TempID.getUserRoles (); line of my datagrid selected event would trigger before the RO call was finished. In this way, I had all the data when the model is being developed. To resolve this problem, I call the code to initialize my model after that my manager RO be finished like this:

    [Bindable]
    private var myUserSecRoles:ArrayCollection;

    private void getRolesHandler(event:ResultEvent):void
    {
    myUserSecRoles = new collection ArrayCollection (event.result as Array);
    Roles2TempID.getUserRoles (); initialize checkboxes
    }

    Now the data is passed to the template until the model itself is initialized. My guess is that I have to do it this way because of Flex how threads. You mind just a guess. But it works now!

    Have an ordinary day...
    KomputerMan ~ |  :-)

  • Conditional image outside of a DataGrid control

    So Joan was kind enough to help me to use the data in a DataGrid cell and conditionally display an image corresponding to cell data. That worked fine, but now I have another question.

    Completely outside the datacell, I have a list of properties that show values based on the selected row in the grid (a detail view she had). Here again, I have the same question, where I need to post 1 of 6 images based on the value of a variable to the object selected in the DataGrid control.

    In the previous example, the solution was to substitute the data method, but which will not work in this case because the element is not a DataGrid control that takes care of that. Any thoughts on how I should approach this?

    Thanks Peter. I have used this set up an event listener to monitor the DataGrid control and then change the image accordingly.

  • Loop on several objects and fill Datagrid?

    Hello

    Any help on this would be much appreciated. I think I'm almost there.

    I am new to Flex and trying to fill the datagrid from a result I get from a remote call. Basically, I have traced my result, and I see the following in the console:

    [object Object], [object Object]

    What is correct. So it appears I have an array of objects. I want to fill each row of the data grid with the data contained in the table.

    So in my code the following is a reference to the "entire" table

    trace (ApplicationState.instance.employeesArray);

    I want to take this 'employeesArray' and fill in the datagrid control. Or do I assign this 'ApplicationState.instance.employeesArray' to some private var and then assign the var private to my datagrid as a supplier?

    How can I do this?

    Thank you

    -Westside

    Well, I found my own question

    Adding to this as the dataprovider has worked:

    dataProvider = "{ApplicationState.instance.employeesArray};

    I don't know if I should convert than some other var as a private for instance, be it his market not now...

    -Westside

  • assignment of several providers of data to a datagrid control

    Hello

    Is there any way by which I can assign several data providers in a DataGrid? I need get the different 2 arraycollections data and assign the data to a datagrid control for a user to compare.

    -Isabelle

    The datagrid control cannot have as a dataprovider. You can combine collections into a single table before linking to your DataGrid.

  • MBP and Hercules DJ Control Air with El Capitan

    My son has this Panel DJ Hercules, which he uses when children have a part here at home. He has used successfully in the past on the MBP with the Mavericks, Yosemite, and he wants to work again with his next birthday. I have not yet found anything ito compatibility or incompatibility with El Capitan.

    Before this specific MBP is updated to El Capitan, I would be grateful if anyone has had experience with the combination configured as such.

    Leo

    MBP 8 6.2 GB RAM 256GB SSD with OS X 10.10.5 and Hercules DJ Control AIR

    Hello Leopardus,

    Thank you for using communities of Apple Support.

    According to the pilot of the Hercules DJControl Air download page, they currently support the latest version of OS X, 10.11.

    https://support.Hercules.com/en/product/djcontrolair-en/

    If you have further questions about this product, then I suggest that get you in contact with their support team.

    https://support.Hercules.com/en/contact-en/?p=DJControl%20AIR

    Take care.

Maybe you are looking for

  • Disable the autoload software instrument GUI, when you select a track

    OK, so maybe this is the most recent update or I can I have turned it on by pressing a wrong button.  But, in the past, when a track was a software instrument are entrusted to him, to open the instrument interface, you would: 1 Select the track via t

  • 2.9.35 Foxclocks icon does not appear in the status bar

    Recently, I installed Firefox 9.0.1 and Foxclocks 2.9.35, but I can't find the Foxclocks icon in the status bar. I checked the Options.

  • Keys Acer S7-392 plugs are removable?

    I don't really have a need to remove my key caps immediately, but I was just curious to know if they are removable, just for future reference

  • J4680 - can not re - install the driver software.

    Problem of impression and he had advised to reinstall the printer software. Uninstalled the program, rebooted & then tried to reload from the original CD of HP Officejet. The operation failed - error message says it could not find a file - and then a

  • How the date of end of the units of measure?

    HelloWhat is the navigation at the end "unit of measures".We have noticed that there are a lot of undesirable UOM exist in our system.We do a cleaning.What is the navigation and the process to end the unwanted UOM date.Thank you very muchSandra