Show ItemRenderer only when editing (onclick)

I have a datagrid, that after the user has logged in becomes editable.
I would like that when the user clicks into a given field, say a date or number field, an itemRenderer that corresponds to the type of date appear.
Example: if i click into the date field, i get a datechooser, or a numericStepper when i click into a number based field.
Then after I click out of that field, it just shows the value, no longer the itemRenderer.
FYI, I am using Pure MVC, so this logic is in a mediator '.as' class.
Please help.

I am getting the itemEditor to work mostly now.
problem i am having is, after i switch the datagrid to become editable and then click into a given field (ie: itemEditor as a numeric stepper), if i just click in and out of the field, but do not make any changes to it, the data in the field either becomes "NaN" (in the case of a numeric stepper editor) or just blank (in the case of a combo box editor)
Here is my code:
DataGrid.mxml
<?xml version="1.0" encoding="utf-8"?>
<!--
PureMVC AS3 Demo - Flex Application Skeleton
Copyright (c) 2007 Daniele Ugoletti <[email protected]>
Your reuse is governed by the Creative Commons Attribution 3.0 License
-->
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
width="100%" height="100%">
<mx:Script>
  <![CDATA[
  import com.*;
  import flash.events.Event;
  import mx.controls.DataGrid;
  import mx.controls.dataGridClasses.DataGridColumn;
  import mx.controls.Alert;
  import flash.net.URLRequest;
  import mx.controls.NumericStepper;
  import mx.controls.DateChooser;
  import mx.controls.CheckBox;
  import mx.controls.ComboBox;
  public static const CREATION_COMPLETE: String = "myCreationComplete";
  public static const LOAD_SETTINGS: String = "load settings";
  private function dateFormat(item:Object, column:DataGridColumn):String
  return df.format(item.date);
  public function onLinkBtnClick(request:URLRequest):void
  //trace("urlRequest: "+request)
  try {
    navigateToURL(request);
  }catch (e:Error) {
    // UNFORTUNATELY, THE ERROR IS THRU INTERNET EXPLORER AND IS NOT CAUGHT HERE
    trace("error: " + e)
    Alert.show("There was an error in opening the requested file!")
  }]]>
</mx:Script>
<mx:DateFormatter id="df" formatString="MM/DD/YY"/>
<mx:VBox width="100%" height="100%" verticalGap="0" >
  <mx:HBox id="cbHBox" width="100%" height="0" fontWeight="bold" horizontalAlign="right" visible="false" >
  <mx:CheckBox id="selectAllCB" label="Select All / None" labelPlacement="left" fontWeight="bold" color="0xFFFFFF" />
  <mx:Spacer width="{colSelected.width/2 + 2}" />
  </mx:HBox>
  <mx:DataGrid id="settingsDataGrid"
  height="100%" width="100%"
  editable="false"
  horizontalScrollPolicy="off">
  <mx:columns>
    <mx:DataGridColumn width="24" headerText="Number" dataField="number" resizable="false"/>
    <mx:DataGridColumn width="120" headerText="Title" dataField="title" />
    <mx:DataGridColumn width="20" headerText="Date" dataField="date" labelFunction="dateFormat" editorDataField="dfDate" itemEditor="com.view.itemRenderers.DGDateFieldEditor"  resizable="false" />
    <mx:DataGridColumn width="12" headerText="Book" dataField="book" editorDataField="nsBook" itemEditor="com.view.itemRenderers.DGNumericStepperEditor" resizable="false" />
    <mx:DataGridColumn id="colType" width="14" headerText="Type" dataField="type" editorDataField="cbType" itemEditor="com.view.itemRenderers.DGTypeComboBoxEditor" resizable="false" />
    <mx:DataGridColumn width="10" textAlign="center" headerText="Link" sortable="false" draggable="false" resizable="false"
    dataField="link" itemRenderer="com.view.itemRenderers.DGLinkButtonEditor"
    rendererIsEditor="true" editable="false"/>
    <!--<mx:DataGridColumn id="colSelected" width="46" headerText="Select" visible="false" editable="false" itemRenderer="{CheckBoxRenderer}"  editorDataField="selected" />-->
    <mx:DataGridColumn id="colSelected" width="46" textAlign="center" visible="false" sortable="false" draggable="false" resizable="false"
    headerText="Select" dataField="sel" itemRenderer="com.view.itemRenderers.DGCheckBoxEditor"
    rendererIsEditor="true" editorDataField="cbSelected"/>
  </mx:columns>
  </mx:DataGrid>
</mx:VBox>
</mx:Canvas>
DGNumericStepperEditor.mxml
 <?xml version="1.0"?>
<!-- itemRenderers\dataGrid\myComponents\EditorDGCheckBox.mxml -->
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
implements="mx.controls.listClasses.IDropInListItemRenderer,mx.managers.IFocusManagerComp onent"
horizontalAlign="center" verticalAlign="middle">
    <mx:Script>
        <![CDATA[
         import mx.controls.listClasses.ListData;
   import mx.controls.dataGridClasses.DataGridListData;
   import mx.controls.listClasses.BaseListData;
   import mx.controls.dataGridClasses.DataGridItemRenderer
   import mx.events.FlexEvent;
   import mx.controls.Alert
   private var _listData:DataGridListData;         
            // Define a property for returning the new value to the cell.
            public var nsBook:Number;           
            // Implement the drawFocus() method for the VBox.
            override public function drawFocus(draw:Boolean):void {
    bookNS.setFocus();
   [Bindable]
   override public function set data(value:Object):void{
    super.data = value;
    bookNS.value = data[_listData.dataField];
   override public function get data():Object {
    return super.data;
      public function get listData():BaseListData
    return _listData;
   public function set listData(value:BaseListData):void
    _listData = DataGridListData(value);
        ]]>
    </mx:Script>
<mx:NumericStepper id="bookNS" horizontalCenter="center" maximum="18" width="100%"
        click="nsBook = bookNS.value" />
</mx:VBox>
PLEASE HELP, getting these itemRenderers and itemEditors to work properly is DRIVING ME CRAZY!!!

Similar Messages

  • Fonts not showing correctly only when on my account page on app store

    fonts not showing correctly only when on my account page on app store

    Firstly, make sure that your device is not hidden (left hand pane). If it just reads device then toggle between SHOW and HIDE.
    Secondly, try all the other ports on your computer, even a number of times.
    Thirdly, if you have another computer try plugging your device into it without taking any action, give it a moment, remove it and try it back in your other computer again.
    Failing all that, see here - http://support.apple.com/kb/TS1538 for Windows and http://support.apple.com/kb/TS1591 for Macs
    And failing all that put the device into Recovery mode. See here and note the paragraph 'If you restore from a different computer.... ' down near the bottom of the page -
    http://www.apple.com/support/ipad/assistant/itunes/

  • Show LOV only when field is blank

    Hi all,
    My environs:
    Oracle 10g on Windows
    Forms [32 Bit] Version 9.0.4.1.0 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Oracle Toolkit Version 9.0.4.1.0 (Production)
    PL/SQL Version 9.0.1.5.1 (Production)
    My problem:
    I have a field in a block, that is text_item and is tied to a LOV item. I want the LOV to show up automatically, each time I tab into it, only when the item is BLANK (say when I am trying to insert into the block). When on query, it should only display the queried value into the field, and user can choose to activate the LOV, by pressing F9, if she wants to. It now displays automatically each time text item is in focus (works fine when user is inserting, but annoying when she has queried the form, and trying to tab thru. Each time she focuses on the field, LOV is popping up!)
    The current property setting on the text field item: Type: Text Item
    List of Values : MY_LOV_NAME
    Validate from List : Yes
    Properties on MY_LOV_NAME
    Automatic Display: Yes
    Any suggestions? Or Item level trigger i can use, and if so, when build_in can I use?
    New to forms and will greatly appreciate advice from pros!!
    Thanks
    Libran_girl

    It is very simply,
    IN When-new-item-Instance
    DECLARE
    V_LOV BOOLEAN;
    BEGIN
    IF :ITEM_NAME IS NULL
    THEN
    V_LOV = SHOW_LOV(LOV_NAME);
    END IF;
    END;
    give it a try, you will get your result, if it doesn't work then try :block_name.item_name
    Abbas

  • Show scrollpane only when table has x rows

    Is there any way to not make use of scrollpane when a table currently has less that 5 rows ?
    I have my table embedded in a JScrollPane, but I want to show the scrollpane only if my table has atleast
    'x' number of rows.
    Thanks,

    Something like...
    DefaultTableModel tm = new DefaultTableModel(data, index);
    int size = tm.getRowCount();
    JTable t = new JTable(tm);
    JPanel p = new JPanel();
    if(size > 5)
      JScrollPane jsp = new JScrollPane(t);
      p.add(jsp);
    else
      p.add(t);
    // add p to JFrame

  • HOW TO SHOW PLUGS ONLY WHEN TRACK IS SELECTED??

    Hello, I has an m audio axiom pro, and it had a cool feature where when you selected a track in logic the plugs you were using for that track would pop up on the screen, when you went to the next track only that tracks plugs would show....
    Is there a way/key command to set this up?
    Thanks!!

    Hello, I has an m audio axiom pro, and it had a cool feature where when you selected a track in logic the plugs you were using for that track would pop up on the screen, when you went to the next track only that tracks plugs would show....
    Is there a way/key command to set this up?
    Thanks!!

  • Smart Albums don't display in Photos App, only when edit Contacts Photo

    I created a Smart Photo Album on my Macbook Pro and synced it to my iPhone4. When I open the Photos App, the smart album isn't listed but when I edit a Contact's photo by clicking on the Choose Photo button, the Smart Album is listed along with all the other albums.
    But when I just go to the Photos App on it's own, the Smart Album is still not there.
    Anyone have a similar problem?

    Welcome to the Apple Discussions. That sounds like an iPhoto or iPhone issue and not an iWeb one. Post your question in the Installing and using iPhoto '09 or iPhone forum.
    OT

  • Missing blue frame that shows around field when editing.

    Often, when fields are close together, the blue frame that shows the field gets in the way of selecting nearby fields. I often wished there was a way to turn this off.  Well, I got my wish. Now, I just see black dots around the field.  I don't know what I did or how to turn this feature back on.  Using LiveCycle 9.

    Hi:
    The feature is selected off/on using:
    View=>Object Editor
    Good luck!
    Stephen

  • Application alias shows up only when logged in as SYS

    Oracle 11gR2
    APEX 4.2.3
    RHEL 6.3
    select *
    from   apex_applications
    where  workspace = 'MY_WORKSPACE';
    -- 0 rows
    When logged into APEX as a user with a workspace assigned (MY_WORKSPACE) that contains an application (and an application alias), no rows are returned when given the application alias in the query above (see the above SQL).
    But log in as SYS and the application alias is there -- i.e. a row is returned.
    What could be causing this?

    Many dictionary views limit rows returned by level of access.
    For instance, schema owners will only see applications related to the workspace their associated with.
    Some views won't let you see any rows unless you're querying via APEX (not SQL Developer), eg: apex_application_files

  • Report showing data only when preview in Eclipse is executed

    Hi people,
    I intend to do a dynamic report sending two parameters and displaying on browser.
    My application runs under Coldfusion 9 and i'm using Java Reporting Component for report generation and Crystal Reports Design for Eclipse 2.0 for design and Oracle 10g database.
    In first preview it shows the parameter window and after confirmation the report is generated. But when i preview again the report is generated with the older data. It seems that the data in the first execution is cached.
    In Coldfusion execution the report appears in browser when the value on the line parameter.setCurrentValue("","Pessoa",value); is the same used in preview. After change this an generic exception Error loading JDBC driver. Class 'oracle.jdbc.driver.OracleDriver' not found is throwed.
    The Coldfusion code is below.
    <cfscript>
         byteRead                    =     '';
         exportFormat               =     createObject('java','com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat').PDF;
         reportBuffer               =     createObject('java','java.io.ByteArrayOutputStream');
         reportDocument               =     createObject('java','com.crystaldecisions.reports.sdk.ReportClientDocument');
         reportParameter               =     createObject('java','com.crystaldecisions.reports.sdk.ParameterFieldController');
         printOutputController     =     createObject('java','com.crystaldecisions.reports.sdk.PrintOutputController');
         connInfo                    =     createObject('java','com.crystaldecisions.sdk.occa.report.data.ConnectionInfo');
         reportPath                    =     expandPath('report/DividasPessoas.rpt' );
         reportDocument.open(reportPath, 0);
         parameter = reportDocument.getDataDefController().getParameterFieldController();
         parameter.setCurrentValue("","Credor","1");
         parameter.setCurrentValue("","Pessoa","226426");
         printOutputController = reportDocument.getPrintOutputController().export(exportFormat);
         reportDocument.close();
         do{
              byteRead = printOutputController.read();
              reportBuffer.write(byteRead);
         }while( printOutputController.available() NEQ 0 );     
         reportBuffer = reportBuffer.toByteArray();
    </cfscript>
    <cfheader name="content-length" value="#ArrayLen(reportBuffer)#" />
    <cfheader name="content-disposition" value="inline;filename=Report.pdf" />
    <cfcontent type="application/pdf" variable="#reportBuffer#" />
    I googled a lot about the problem, reviewed all Eclipse options to disable the "cache" but everything was unsuccessful.
    I don't know if missing code is causing this or another component that i need to use.
    Any suggestions?
    Thanks everybody for attention and sorry for english errors.
    Ian

    Hi,
    Regarding your query that when you preview a report that has parameters in it, the prompts daillog box comes when you first preview the report.when you again preview you get the old values again.
    For this there is a refresh button, click on refresh, it will again promt you for parameters.
    Thanks
    Prithvi

  • Hide/Show columns only when exporting to .CSV

    Hi, how can i hide a particular column when exporting the report to excel

    Hi,
    You can set column conditionally by request.
    E.g. columns that you do not like export set condition PL/SQL function body returning a boolean
    RETURN NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF');I have sample here
    http://apex.oracle.com/pls/otn/f?p=40323:63
    EMPNO column is not exported from report
    Br,Jari

  • Halo shows logo only when loaded on my 2011 MBP

    I have a one week old MacBook Pro with Windows 7 installed from Boot Camp. When I installed the Halo Trial and tried running, I just see the loading screen, even though I can hear my mouse scrolling down the menu and the music in the background. Is this an issue with the Intel HD driver or what exactly? Thanks.

    Your question will be best answered here:
    https://discussions.apple.com/community/windows_software/boot_camp

  • InDesign becomes unresponsive when editing text off the network. Techs are flummoxed!

    Recently my InDesign (CS6 running on Windows 7 Pro 64 bit, 8gb ram) has become almost totally unresponsive when I go to open and edit a file off the company network. Our techs have no idea what is going on and are considering having to re-build my profile as a last resort as we have tried everything else.
    A bit more of a descriptoin of the problem: When I go to edit an InDesign file off the server it first takes longer than normal to load but eventually does. You can scroll up and down the pages, move and resize boxes, place new pictures but as soon as you try to do anything text based (edit new text or make a new text box) the whole program freezes to the point you have to task manager out and kill it. It is not a corupt file because if I copy the file directory with all links over on to my computers local hard disk the file works totally fine it is only when editing over the network and when edouble clicking to edit text.
    What we have done to try and fix the problem:
    Reinstal InDesign - No effect
    Cleared the preferences (shift + ctrl + alt + windows key on InDesign startup) - No effect
    Our techs have tried editing my profile registry to no avail and we are all compleatly at a loss to what is going on. There are several other instances of the program across the company (mainly versions 5.5 and one other 6) and they all work fine editing files straight off the network.
    Anyone have any idea what it could be, such a specific problem being only when it is editing text based areas? The techs dont want to have to re-build my profile as it is a lot of back end work to do to be able to re-instate it straight away.
    Many thanks in advance for any insights into the issue

    So we have finally fixed the issue and are currently cracking out the bubbly!
    It turned out to be the network path shotcut I was using to access the shared drive where I was editing the files from. I work for a restaurant so we have a shared drive where each site can access their files, this is where the food menu files reside and I had created a shortcut that, although accessed the correct area did it using a path which had a double backslash in it.
    The true path for the shared drive is  \\hm\mydocs\restaurant\menufile.indd and this is the shortcut I was using to open the file up from. For all other files like Word, Excel, even other Adobe programs like PSE10, and Lightroom it seems to work fine. For some reason InDesign does not like this path with the double backslash in. As soon as I changed the shortcut path to just m:\ (the letter of the shared drive on the network) everything was working again and we can all sleep, it was driving us mental. Re-installed windows, InDesign created a new network user profile the works.
    I hope this may help someone else in a similar situation in the future

  • I edited a movie on iMovie but when i try to upload it to youtube only half the video shows ( its only 3 minutes long) does it need converted? help?????

    i edited a movie on iMovie but when i try to upload it to youtube only half the video shows ( its only 3 minutes long) does it need converted? help?????

    I have the same issue.  If you are exporting from iMovie version 10.0.1, I run into the same issues if I export directly to YouTube or if I export to file then upload to YouTube.
    Google's help file doesn't properly address this problem and thier help is also out of date.  In talking to a support rep at Apple, they said the export to YouTube should just work or the exporting to a file then uploading otherwise it's an issue for Google support.
    If someone can post a solution that works (is a streamable format - which is different than the format that YouTube accepts as it will accept many formats but take a long time to process them), I'd be interested to hear also.
    Thanks,
    Rob.

  • HT4623 My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. 

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

  • My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

Maybe you are looking for

  • GPS problem - no location

    Hi! I have a problem with GPS on A1.  It doesn't find a location both in Google maps and in NavDroid, just search icon start blinking and can blinking for hours.  Reset didn't help. Clean sky, and sunny weather didn't help neither. Are familiar with

  • I have a question. my ipod won't mount

    I have 3rd generation ipod 40gb. The ipod plays fine (whats on it) but when i plug it in the bells go off and the ipod reads "do not disconnect" but itunes won't open and if i open it myself it still dosen't see the ipod. I was going to retore it but

  • Can't see file code

    I'm using DW 8.0.2 on this computer (30-day trial of full version CD I have). On my home computer I have DW MX 6.1. I am trying to edit existing website files from a website that I didn't design. It has ".htm" files, ."html" files, and ".asp" files.

  • Logic 6 Plugin settings

    Hi there.... I still have Logic 6 installed on my machine (now running LP7) because it gives you the plugin presets from logic 6 which aren't in version 7. There are a lot of these that I still use. I want to get rid of 6 but I don't want to lose all

  • Transferring Photos to a New Computer

    I just bought a new computer and I want to transfer photos from my old computer. There are many projects and albums from my aperture library I want to transfer over, however not all of them, so I don't want to transfer the whole library. What is the