How to end Spark datagrid editing session

I am reading that I can use endEditorSession to end editing session programmatically.
http://help.adobe.com/en_US/flex/using/WS0ab2a460655f2dc3-427f401412c60d04dca-7ff3.html#WS 0ab2a460655f2dc3-427f401412c60d04dca-7fec
But DataGrid object does not have such method. Can someone clarify how to end up editing session?
Thanks

Checking "Continuously Updates Value" in the Bindings inspector under Value helped.

Similar Messages

  • Spark DataGrid - editing session

    I am trying to specidy a listener to catch a data change in Spark DataGrid. Here is my code:
    <s:DataGrid requestedRowCount="4" fontSize="11" sortableColumns="false"
                                       id="engines" rowHeight="22" gridItemEditorSessionStarting="processData(event)"
                                       height="100%">
                             <s:columns>
                                  <s:ArrayList>
                                       <s:GridColumn dataField="initial" headerText="Initial" width="50">
                                            <s:itemRenderer>
                                                 <fx:Component>
                                                      <s:GridItemRenderer>
                                                           <s:layout>
                                                                <s:VerticalLayout paddingLeft="2"
                                                                                      verticalAlign="middle"/>
                                                           </s:layout>
                                                           <s:TextInput restrict="a-zA-Z"/>
                                                      </s:GridItemRenderer>
                                                 </fx:Component>
                                            </s:itemRenderer>
                                       </s:GridColumn>
    but processData does not get fired.
    Any idea?

    A cell editor is placed over the top of a cell and it is sized by the DataGrid to be the same height as the cell. The height of the cell is not changed. Are you see the cell height change when you are using a built-in cell editor or your own custom cell editor? In any case, you can you the prepare() method of a cell editor to make any final adjustments to the cell editor that you want, including changing the height of the cell editor.
    -Darrell

  • How to make spark datagrid columns to behave like mx datagrid columns

    Hello.
    I have a problem with spark datagrid component. I can't force spark datagrid columns behave like old mx datagrid columns. In mx datagrid columns fills 100% of datagrid regardles of resizing column or datagrid itself (it will not show horizontal scrolling bar). In spark datagrid last column (colC) will never word wrap, event after setting horizontalScrollPolicy=off. I would like to somehow constrain spark columns to behave like mx ones.
    App snippet (try to resize app and columns - especially colC - and you will see what I mean):
    <?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">
        <fx:Declarations>
            <s:ArrayCollection id="dp">
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
                <s:DataItem colA="some sample data" colB="some sample data" colC="some sample data"/>
            </s:ArrayCollection>
        </fx:Declarations>
        <s:layout>
            <s:HorizontalLayout/>
        </s:layout>
        <s:DataGrid id="grid" width="100%" height="100%" dataProvider="{dp}" variableRowHeight="true" horizontalScrollPolicy="off">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn headerText="Column A" dataField="colA"/>
                    <s:GridColumn headerText="Column B" dataField="colB"/>
                    <s:GridColumn headerText="Column C" dataField="colC"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>
        <mx:DataGrid id="grid2" width="100%" height="100%" dataProvider="{dp}" wordWrap="true" variableRowHeight="true">
            <mx:columns>
                <mx:DataGridColumn headerText="Column A" dataField="colA"/>
                <mx:DataGridColumn headerText="Column B" dataField="colB"/>
                <mx:DataGridColumn headerText="Column C" dataField="colC"/>
            </mx:columns>
        </mx:DataGrid>
    </s:Application>

    the datagrid has sortItems and sortItemsOn methods you can use.

  • How to filter spark datagrid?

    SORRY, I TRY TO FILTER MY DATAGRID, BUT IT DOESN'T WORK.
    WHAT'S WRONG IN THIS CODE?
    IN THE DEBUG EVERYTHING IS OK UNTIL THE BOLD TEXT, BECAUSE THE DATAPROVIDER IN DATAGRID IS NOT FILTERED.
    PLEASE HELP ME!!!
    THANK YOU.
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Albo" creationComplete="init(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import spark.events.GridEvent;
                import spark.events.TextOperationEvent;           
                import spark.components.TextInput;           
                import spark.components.DataGrid;
                import mx.collections.ArrayList;
                protected function init(event:FlexEvent):void
                    IngegneriXML.send();
                private function gridClickEvent(event:GridEvent):void
                    navigator.pushView(Dettaglio, event.target.selectedItem);
                private function filterDataProvider(obj:Object, idx:int, arr:Array):Boolean
                    var txt1:String = RicCogn.text;
                    var txt2:String = obj._item.cognome.toString();
                if (txt1.toLowerCase() == txt2.toLowerCase())
                    return true;
                    return false;
                protected function RicCogn_changeHandler(event:TextOperationEvent):void
                    var arr:Array = Grid1.dataProvider.toArray();
                    var filteredArr:Array = arr.filter(filterDataProvider);
                    Grid1.dataProvider =  new DataProvider(filteredArr);
                    Grid1.dataProvider.refresh();
                    var ara2:Array = Grid1.dataProvider.toArray();
                    var ara3:Array = Grid1.dataProvider.toArray();
            ]]>
        </fx:Script>   
        <fx:Declarations>
            <s:HTTPService id="IngegneriXML" url="C:\AlboFlash\DatiXML\ingegneri.xml"/>
        </fx:Declarations>
        <s:TextInput x="0" y="0" id="RicCogn" change="RicCogn_changeHandler(event)"/>
        <s:DataGrid id="Grid1" x="0" y="80" dataProvider="{IngegneriXML.lastResult.ingegneri.ingegnere}" height="100%" width="100%" gridClick="gridClickEvent(event);">
            <s:columns>
                <s:ArrayList id="columns">
                    <s:GridColumn dataField="cognome" headerText="Cognome" minWidth="100"/>
                    <s:GridColumn dataField="nome" headerText="Nome" minWidth="100"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>
    </s:View>

    I made it :-)
    I revealed the magic.
    Actually without knowing it, I was misusing the ArrayCollection class and treating it as Model, while it was obviously designed for View purposes.
    Now I'm using ArrayList for that, and then I create a new ArrayCollection for different views. Then I use newArrayCollection.list = myList and newArrayCollection.filterFunction = ...
    This works for me.
    My recomendation would be to improve the documentation a bit, so that it is clear that it is not recommended to use same ArrayCollection for multiple views.
    Regards,
    Dinko

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

  • How to change header font style in Spark DataGrid?

    I'm looking since last week for a way how to change the font style of the header in a Spark DataGrid. It drive me nuts that I can't find a way to do this. Have anyone one an idea how to achieve it? Any help is appreciated.
    Thanks,
    - Artur

    Hi,
    Some styles won't work because some text styles got hardcoded into the DefaultGridHeaderRenderer's Label. You'll run into this issue not just with the DataGrid headers but also things like the Panel's title and other places where we have text. One way to get around this issue is to create your own custom headerRenderer based on the default one and then redefine the headerRenderer skin part in the skin.
    First, create a subclass of the DefaultGridHeaderRenderer and tweak the "labelDisplay" to your liking (or even just take out all the styles and style it on your own as you had earlier using your custom header renderer's name). Example below (I named it "CustomHeaderRenderer"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DefaultGridHeaderRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:skins="spark.skins.spark.*"
                                     xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Remove fontweight="bold" and other styles as you wish
                 Must be a component and not a factory. -->
            <s:Label id="labelDisplay"
                     verticalCenter="1" left="0" right="0" top="0" bottom="0"
                     textAlign="start"
                     verticalAlign="middle"
                     maxDisplayedLines="1"
                     showTruncationTip="true" />
        </fx:Declarations>
    </skins:DefaultGridHeaderRenderer>
    Next, create a simple DataGrid skin by creating a subclass of the  spark.skins.spark.DataGridSkin in MXML and defining a new headerRenderer  component in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DataGridSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:skins="spark.skins.spark.*"
                    xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Must be a factory with the right id for the skin part -->
            <fx:Component id="headerRenderer">
                <comps:CustomHeaderRenderer />
            </fx:Component>
        </fx:Declarations>
    </skins:DataGridSkin>
    Last, assign your new skin as the skinClass of your DataGrid (either in MXML or as a style):
    <s:DataGrid skinClass="comps.CustomDataGridSkin">
    I know it's not pretty, but it's the result of trading off between having completely custom skinning vs. having knobs to tweak every style. Hope this helps.
    -Kevin

  • How to end RDP sessions remotely from different network?

    Hi
    How to end RDP sessions remotely for windows 2008r2 server from different network?
    not from local LAN
    Thanks

    Hi
    what ports need to be open to successfully connect to server behind firewall?
    from WAN to LAN using :
    net use \\servername_or_IP /USER:username “password“
    or
    qwinsta /server:ServerIP
    Thanks

  • How to change the header text fontFamily of spark DataGrid?

    I use an embed font (Nunito-Light.ttf),  and i can set the font of GridColumn to Nunito-Light in DataGrid , but it seems that it has no effect to the header of DataGrid.
    and then I create a  headerRenderer for spark DataGrid, and try to set the fontFamily of "labelDisplay" to Nunito-Light  , but It seems still no effect .
    If I set the fontFamily of "labelDisplay" to "Verdana" or "Arial" , it has effect , so strange! Is that a bug?
    Anybody  has the same problem? Please tell me how to solve it ,thank you very much!

    Hi,
    Please go through following link :
    http://forums.adobe.com/thread/870081#870081
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • How to filter a spark datagrid using a checkbox?

    Hi i want to know how can i filter a spark datagrid using  a check. I have a column by the name status on the datagrid, which can be active or inactive. When i check the checkbox i should be able to see all the records and when i uncheck it i should only be able to see all the records with the status ACTIVE...

    Then, try to add another attribute in your SELECT VO statement, which truncates the original date_and_time field:
       SELECT.... TRUNC(DATE_AND_TIME) as truncated_dateAfter that, put reference to that attribute in the filter facet, as follows
             <f:facet name="filter">
                      <af:inputDate value="#{vs.filterCriteria.TruncatedDate}" id=.../>
             </facet>Do not forget to add the TruncatedDate attribute in the <tree...> binding in the pageDef, along with others VO attributes. Do that manually.

  • Best way to mark data that has changed when it is edited in  a spark datagrid?

    I am not sure if this is the best way to mark data that has changed (isModifiedClientSide ) when it is edited in  a spark datagrid:
    <GridColumn  width="140" headerText="Margin "dataField="margin" editable="false"  editable.editMode="true"  >
                        <itemRenderer>
                            <fx:Component>
                                <DefaultGridItemRenderer textAlign="right"   background="true" backgroundColor="#ffffff"  alpha="1.0" color="#000000" >
                                    <focusOut>
                                        <![CDATA[
                                        this.data.isModifiedClientSide = 1;
                                        ]]>
                                    </focusOut>
                                </DefaultGridItemRenderer>
                            </fx:Component>
                        </itemRenderer>
                    </GridColumn>

    I tried this but the value commit doesnt't get fired bro:
        <GridColumn  width="140" headerText="Margin (disabled)" headerText.editMode="Margin (editing)" dataField="margin" editable="false"  editable.editMode="true"  >
                        <itemEditor>
                            <fx:Component>
                                <DefaultGridItemEditor>
                                    <valueCommit>
                                        <![CDATA[
                                        this.data.isModifiedClientSide = 1;
                                        ]]>
                                    </valueCommit>
                                </DefaultGridItemEditor>
                            </fx:Component>
                        </itemEditor>
                    </GridColumn>
    what do you think?

  • How to resize the spark datagrid collumns based on the headertext?

    Hi friends,
         I am using spark datagrid for displaying the tablur data in my application, when i setting the dataprovider property of the datagrid, it displays the content exactally what i expeceted.
    but the widht of the collumns are based on the content of the dataprovider, i am not able to see the full collumn name in the datagrid's header. I want to display the full collumn name to the users without setting the collumn width explicitly because the data are dynamically returned from the server. could you pls give me some ideas to acheive this...?
    Thanks in advance.

    Hi Karthikeyan Subramain,
    You can make use of typicalItem proberty to set the column width.
    Here is the link for sample code which uses typicalItem:
    http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-dat agrids-columns-with-a-typicalitem/
    Hope this will help you
    Thanks and Best regards,
    Pooja Kuber | [email protected] | www.infocepts.com

  • How to end user session correctly as sys or system user

    Hi,
    Database version Oracle 10.2.0.3
    We have to end user sessions to update database content. We cant stop/shutdown the instance but we have to assure that some users are not logged on.
    So we are looking for a solution to end some arbitrary user sessions as sys or system user without using the KILL USER SESSION option. We want to assure that the user sessions end correctly.
    Is there a possibility or a command in Oracle 10g to end a user session correctly ?
    Thanks for your assistance.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#i2053602
    I think DISCONNECT SESSION Clause is what you are looking for.
    Let us know if this is not the case.

  • How to add string in editable datagrid

    Hai
           I have attached the mxml below.
       I need to add ' ' before and after the value.
       1. here i have the mxml, run the mxml , enter some vlaue in textbox and click add button, now the values will be added
       2. u can see the value in single quotes ie. ' '
       3. now u click the Value column  u can edit the value, after editing the value will not be in ' '
       4. here i have a problem, if the value is not in ' ' , i cant submit that query.
       5. how can i add ' ' after editing .
    can any one help me
    Thanks in Advance : )
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    >
    <mx:Script>
    <![CDATA[
    // ActionScript fileimport  
    mx.rpc.events.FaultEvent;
    import  
    mx.controls.Alert; 
    importmx.managers.CursorManager;
    import  
    mx.collections.ArrayCollection;[
    Bindable]
    public var adhoc:ArrayCollection = newArrayCollection();[
    Bindable] 
    public var serverString = "";
    private function initImage(event:MouseEvent):void{
    if(adhoc.length > 0){
    private function onChange():void{
    if(comboBox.selectedIndex == 0){
    else{
    private function onChange1():void{
    if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){datepick.visible =
    truetxt.visible =
    false}
    else{txt.visible =
    truedatepick.visible =
    false
    private function add():void{
    varstr:String = txt.text; 
    if(str.length == 0 && txt.visible == true){Alert.show(
    "Value Can Not Be Empty"); 
    return;
    if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
    if(txt.visible == true){ 
    var temp:Object = newObject();
    "'"+txt.text+"'";
    varstr1:String = datepick.text; 
    if(comboBox.selectedIndex == 1){ 
    if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){ 
    if(str1.length == 0 && datepick.visible == true){Alert.show(
    "Date Cannot Be Empty");}
    else{ 
    var temp:Object = newObject();
    false;addopenbracket.enabled =
    false;combo2.enabled =
    false;combo1.enabled =
    false;
    private function querydelete():void{
    if(AdHoc.selectedIndex > 0) { 
    if(AdHoc.selectedIndex == (adhoc.length-1)){adhoc[AdHoc.selectedIndex-1].cond =
    ""; addopenbracket.enabled =
    false;addclosebracket.enabled =
    false;addbutton.enabled =
    false;combo2.enabled =
    false;combo1.enabled =
    false;
    // adhocdetailgridcompilance.dataProvider = null ; 
    // adhocdetailgrid.dataProvider = null ;
    else if(adhoc.length == 1) {
    // adhocdetailgridcompilance.dataProvider = null ; 
    // adhocdetailgrid.dataProvider = null ;addopenbracket.enabled =
    true;addclosebracket.enabled =
    true;addbutton.enabled =
    true;combo2.enabled =
    true;combo1.enabled =
    true;}
    else{Alert.show(
    "Select The Rows To Delete");
    private function andSubmit():void{
    for each(var obj:Object inadhoc){ 
    if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){ 
    if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
    if(txt.visible == true){ 
    trace("2 equals"); 
    var temp:Object = newObject();
    else{ 
    trace(obj.fname + ":"+ combo2.selectedItem);  
    trace(obj.opera + ":"+ combo1.selectedItem); 
    trace(obj.val + ":" + "'"+txt.text+"'");
    else if(obj.fname == addclosebracket.label){ 
    if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
    if(txt.visible == true){ 
    trace("2 equals"); 
    var temp:Object = newObject();
    else{ 
    trace(obj.fname + ":"+ combo2.selectedItem);  
    trace(obj.opera + ":"+ combo1.selectedItem); 
    trace(obj.val + ":" + "'"+txt.text+"'");
    if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){ 
    if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){ 
    if(datepick.visible == true){ 
    trace("2 equals"); 
    var temp:Object = newObject();
    else{ 
    trace(obj.fname + ":"+ combo2.selectedItem);  
    trace(obj.opera + ":"+ combo1.selectedItem); 
    trace(obj.val + ":"+ datepick.text);
    else if(obj.fname == addclosebracket.label){ 
    if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){ 
    if(txt.visible == true){ 
    trace("2 equals"); 
    var temp:Object = newObject();
    else{ 
    trace(obj.fname + ":"+ combo2.selectedItem);  
    trace(obj.opera + ":"+ combo1.selectedItem); 
    trace(obj.val + ":"+ datepick.text);
    true;addopenbracket.enabled =
    true;combo2.enabled =
    true;combo1.enabled =
    true;
    private function orSubmit():void{
    for each(var obj:Object inadhoc){ 
    if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){ 
    if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
    if(txt.visible == true){ 
    trace("2 equals"); 
    var temp:Object = newObject();
    else{ 
    trace(obj.fname + ":"+ combo2.selectedItem);  
    trace(obj.opera + ":"+ combo1.selectedItem); 
    trace(obj.val + ":" + "'"+txt.text+"'");
    else if(obj.fname == addclosebracket.label){ 
    if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
    if(txt.visible == true){ 
    trace("2 equals"); 
    var temp:Object = newObje

    you declare Fchg's three parameter is any data type,so you can directly use Fchg
    function.
    "beawhycn" <[email protected]> wrote:
    >
    1.if buffer type=FML,then ' Fchg(sendBuf, Fldid("ACCOUNT_ID"), 0, accountNumber&,
    0)' can add the accountnumber into sendbuffer.
    2.if buffer type=STRING ,then how can i add a simple string into sendbuffer
    before
    the tpcall()?
    Eager for the reply.

  • How do I get itemDoubleClick event in spark DataGrid ???

    Hello Everyone,
    Recently I am working with Spark DataGrid.
    Before I was using AdvancedDataGrid. In that I was capturing itemDoubleClick event.
    But I am not able to find such a event in SparkdataGrid.
    So I want to capture double click event on single row of DataGrid.
    Some people told that, I have to use my custom ItemRenderer to do that.
    But is there any way to capture itemDoubleClick event in Spark DataGrid without creating custom ItemRenderer ???

    You are correct.  I looked a the code and the comment says it dispatches a double click if the 2nd click is within the  DOUBLE_CLICK_TIME even if the first click was on another cell.
    This code figures out if the double-click is a true double-click.
    <?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">
        <fx:Script>
            <![CDATA[
                import spark.events.GridEvent;
                private var lastColumnIndex:int = -1;
                private var lastRowIndex:int = -1;
                // set this to change the double click time   
                //mx_internal::event.grid.DOUBLE_CLICK_TIME = 480;  // ms
                protected function dataGrid_gridClickHandler(event:GridEvent):void
                    trace("click on this cell", event.rowIndex, event.columnIndex);
                    lastRowIndex = event.rowIndex;
                    lastColumnIndex = event.columnIndex;
                protected function dataGrid_gridDoubleClickHandler(event:GridEvent):void
                   if (event.rowIndex == lastRowIndex && event.columnIndex == lastColumnIndex)
                       trace("a real double click on this cell", event.rowIndex, event.columnIndex);
                   else
                       trace("this is a gridClick on another cell", event.rowIndex, event.columnIndex);
                   lastRowIndex = event.rowIndex;
                   lastColumnIndex = event.columnIndex;
            ]]>
        </fx:Script>
            <s:DataGrid id="dataGrid" requestedRowCount="5" verticalCenter="0" horizontalCenter="0"
                         doubleClickEnabled="true"
                          gridClick="dataGrid_gridClickHandler(event)"
                          gridDoubleClick="dataGrid_gridDoubleClickHandler(event)">
                <s:ArrayCollection>
                    <s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/>
                    <s:DataItem key="1001" name="Brush" price="110.01" call="true"/>
                    <s:DataItem key="1002" name="Clamp" price="120.02" call="false"/>
                    <s:DataItem key="1003" name="Drill" price="130.03" call="true"/>
                    <s:DataItem key="1004" name="Epoxy" price="140.04" call="false"/>
                    <s:DataItem key="1005" name="File" price="150.05" call="true"/>
                    <s:DataItem key="1006" name="Gouge" price="160.06" call="false"/>
                    <s:DataItem key="1007" name="Hook" price="170.07" call="true"/>
                    <s:DataItem key="1008" name="Ink" price="180.08" call="false"/>
                    <s:DataItem key="1009" name="Jack" price="190.09" call="true"/>            
                </s:ArrayCollection>
            </s:DataGrid>
    </s:Application>

  • Spark datagrid - custom renderers

    In my Spark DG I have a column that serves a purpose of starting and ending an editing session. I use a custom item renderer with a button that when I click on it initiates editing and gets its icon changed.
    When I click on the same button in another row I want to end editing in the first row and flip its button back to original. I am using states for that.
    Everything seems to be working except when I start editing in row #1 from the top and then click on a button in any other row the button in the first row does not change its icon.
    It has been already days of work trying figuring out what is so special in the row #1. No luck. Please help.
    Thank you.

    I am implementing the datagrid that only redraws and refreshed the cells that are updated insted of refreshing the whole datagrid.
    There is already and example  on MX Datagrid which refreshed only particular cells. Here is the link http://blogs.adobe.com/tomsugden/2010/04/optimizing_the_flex_datagrid_f.html . we can test it by launching application, right click on the application and select "Show redraw regions"
    I have the similar requirement (updating only the refreshed cells, insted of whole datagrid) but I want this feature in Spark Datagrid.
    (similar  one on spark is in this link http://hansmuller-flex.blogspot.com/2011/07/high-performance-christmas-tree.html)
    I am using the prepare method, but still the functionality is not working. When I right click and select show redraw regions. The whole daatgrid is redrawn instead of particular cells.
    override public function prepare(hasBeenRecycled:Boolean):void  {

Maybe you are looking for

  • Whats the difference between the iMac 2010 and 2011?

    I'm currently looking for an iMac as I am a beginner professional photographer and I am confused as to which year model is right for me. The price difference is about $200 and as a student, thats quite a lot of money. I understand that for profession

  • Updating the Dates on an Existing Shipment

    Hi, I am trying to find a Function Module/Idoc that I can use to update the various dates (planned delivery, actual delivery dates) within a shipment. I am getting the shipment information via a ANSI 214 transaction.  I've tried the IDOC_INPUT_SHIPME

  • Write spreadsheet column limitation

    Hello, I'm trying to use write spreadsheet to save my structure of arrays. I use an insert into array to join some arrays (10). I've got 450 variables (%.3f). But when I read the saved file, it's showed me 30 Columns*15 lines columns instead of 450 c

  • Sun Java Desktop System

    Please what is this all about? Where can one get to read well about this..is it free to get?

  • Import error (8.1.6 - 10g)

    Hello all, I am trying to import data to 10g database using dump files created on oracle 8.1.6. A week ago I already did this with some other database but now I am getting the following error: . importing SCOTT's objects into SCOTT IMP-00009: abnorma