DataGrid and Validation?

I'm having a hard time putting a CurrencyValidator inside of
a DataGrid. The breakpoints would indicate that the data binds
properly, but I get an unfortunately XML mess with big scrollbars
in the datagrid instead of what I'd expect.
Here's the GenericDollarFormatItemRenderer.mxml that
intuition built:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.controls.dataGridClasses.DataGridColumn;
public var dataField:String;
[Bindable]
private var dataString:String;
public function newInstance():*
return new GenericDollarFormatItemRenderer();
override public function set data(value:Object):void {
if( value != null ){
super.data = value;
if( !(value is DataGridColumn) && dataField != null
&& value[dataField] != null ){
dataString = value[dataField];
obj:Object;
]]>
</mx:Script>
<mx:CurrencyValidator id="pnV" source="{ti}"
property="text"
trigger="{ti}" triggerEvent="change" required="true" />
<mx:TextInput id="ti" text="{dataString}"
updateComplete="dataString=ti.text;"
change="dataString=ti.text;"/>
</mx:HBox>
I'm adding it to my DataGrid as follows:
[Bindable] private var cf1:ClassFactory = new ClassFactory(
GenericDollarFormatItemRenderer );
cf1.properties = { dataField: 'price' };
<mx:DataGridColumn headerText="price" textAlign="right"
editable="true" itemRenderer="{cf1}" />
The data source for the data grid is e4x XML drawn from an
HTTPService.
Any experts out there can elucidate this one? If I'm on the
completely wrong track, let me know! This is a needed to be done
yesterday type of thing :)
Thanks
Alex

Worst forums ever! Nobody can help with the insertion of a
currencyvalidator in a datagrid itemeditor?

Similar Messages

  • Editing with a DataGrid and validating user input

    Editing
    with a DataGrid Tutorial
    How to edit the information in a Flex 2 DataGrid directly,
    without data binding TextInputs to it.
    Uses a Remote Object, a CFC, and a Microsoft Access database
    to demonstrate how.
    Uses Actionscript to validate the data the user types into
    the DataGrid.

    We created an itemEditor for our dataColumn that was a
    mx:TextInput. Then we used the textInput event to capture keys as
    they are typed. You get a TextEvent from that which you can cancel
    if it something you don't want the user entering. We used regexs
    for are validation here. I'm not sure if this is the best way to
    handle this sort of thing, but it worked.

  • How to know the balance and validity of internet data in iPad

    How to know the balance and validity of internet data in iPad?

    Sir I m using internet in ipad4 with airtel network
    They provide me 2gb data with the amount of 255 rupees
    And now I inserted the sim in my ipad4
    And start the surfing on safari n all
    And now I wanted to know how much data is balance.

  • Need help. I am running a 27 in imac with 16 gigs of ram. Photoshop runs really fast, except when opening files. It takes 5-10 minutes to open even a small file of 1 meg. I cleaned and validated all the fonts and removed all questionable fonts. Reset pref

    Need help. I am running a 27 in imac with 16 gigs of ram. Photoshop runs really fast, except when opening files. It takes 5-10 minutes to open even a small file of 1 meg. I cleaned and validated all the fonts and removed all questionable fonts. Reset preferences and still have problem. Slow to open and in force quit "Photoshop not responding" At this point should I uninstall and start over.

    What are the performance Preferences?

  • How to Use the language function for assignment and validation

    Hi All,
    If anyone can explain me in details with example ,how to use the language function for assignments and validations?
    Thanks
    Arnab

    Hi Arnab,
    The expression is checked only for the current MDM session.
    If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
    Try connecting to the DM with the XYZ language.
    It should go to the if part rather than else.
    Hope it helps.
    Thanks,
    Minaz

  • How to get the latest and valid BOM item entry from STPO

    hi,
    may i know with what condition we can get the latest and valid BOM item entry from STPO table?
    i have STLNR and IDNRK as a input. But i realized that it would return multiple entry due to the combination of  valid-from and valid till date.
    can i use stlnr,idnrk and stpoz (with the latet counter) to get the latest and valid BOM entry?
    thank you.

    Hi
    You can get the latest BOM either by using the latest valid from date DATUV or latest internal counter STPOZ
    Regards
    Shiva

  • Difference between "Binding Period" and "Validity Start/End" in Bid

    SRM Experts,
    1. We see 2 different things, "Binding Period" and "Validity Start/End" while preparing the bid. What is the differece between these?
    2. These fileds are non-editable for the bidder, while preparing the bid response. How bidder can give validity period for his quote (at header level)?
    3. We see that, the bidder can specify validity start/end date at condition level. Is it not possible to specifiy a validity of the quote at header level?
    GH

    case1: After expiration of  - binding period in RFx header:
    case2: After expiration of  - validity end period in RFx header:
    case3: After expiration of  - validity end period of RFx Response:
    I created seprate documents for each cases.
    I tried accepting the RFx response in all above 3 cases system did not give any error.
    I tried creating the PO against the RFx response in all above 3 cases system did not give any error.
    Is it correct behavior or is there any problem?
    GH

  • How to delete a selected row from datagrid and how to create a datagrid popup

    hi friends,
                  I am new to flex.i am doing a flex4 application,i need help for this.
                i am having a data grid with columns.i have two questions.
               Ques 1: when  i selected a partiuclar row from a datagrid and click delete button  means that record will delete from the datagrid and DTO from the cloud  tables also.
                Ques 2: when i save  the data grid values using save button means that data will store in  respective cloud DTO which is related to the datagrid,
                     My requirement is i am using a search button when i click the search  button it will show a datagrid that datagrid will contain the previous  datagrid datas which is saved in the cloud.
    REQUIREMENT example: first screen:           i am using with data grid 3 columns (Student Roll number ,Student Name,Student pecentage)---->save--->data will store in cloud DTO.
    Second screen:                search button ----> it need show  datagrid popup.it will have data which we saved in the first screen with same columns(Student Roll number ,Student Name,Student pecentage).
    This is my requirement.
    Any suggession welcome.
    Thanks in advance.
    B.Venkatesan

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • How to delete a Selected row from datagrid and how to create a datagrid popup with saved values

    hi friends,
                  I am new to flex.i am doing a flex4 application,i need help for this.
                i am having a data grid with columns.i have two questions.
               Ques 1: when i selected a partiuclar row from a datagrid and click delete button means that record will delete from the datagrid and DTO from the cloud tables also.
                Ques 2: when i save the data grid values using save button means that data will store in respective cloud DTO which is related to the datagrid,
                    My requirement is i am using a search button when i click the search button it will show a datagrid that datagrid will contain the previous datagrid datas which is saved in the cloud.
    REQUIREMENT example: first screen: i am using with data grid 3 columns (Student Roll number ,Student Name,Student pecentage)---->save--->data will store in cloud DTO.
    Second screen: search button ----> it need show  datagrid popup.it will have data which we saved in the first screen with same columns(Student Roll number ,Student Name,Student pecentage).
    This is my requirement.
    Any suggession welcome.
    Thanks in advance.
    B.Venkatesan

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • Help with Conditional Display and Validation

    Version 4.1.1.00.23
    Hello,
    I'm having a difficult time with a conditional display and validation I'm hoping someone can help with.
    Requirements:
    When the Start Date (Datepicker) and/or End Date (Datepicker) change then display the Change Reason (Select List) and Change Description (Textbox)
    If the page is saved without entering a Change Reason display a validation error message that the Change Reason cannot be empty (NULL)
    What I've tried
    Create a Dynamic Action on the Start Date
    Event: Change
    Selection Type:Item(s)
    Items(s): P51_START_DATE
    Condition: none
    True Action Section:
    Action: Show
    Fire on Page Load: Checked
    Show all page items on the same line: No
    Affected Items Section:
    Selection Type:Item(s)
    Item(s): P51_CHANGE_REASON,P51_CHANGE_DESC
    I've also created a Dynamic Action with similar settings for the P51_END_DATE.
    I created a Validation for the P51_CHANGE_REASON as Function Returning Error Text:
    DECLARE
        v_start_date    work_items.start_date%TYPE;
        v_end_date      work_items.end_date%TYPE;
    BEGIN
        SELECT start_date
              ,end_date
        INTO   v_start_date
              ,v_end_date
        FROM   work_items
        WHERE  work_items_id = :P51_WORK_ITEMS_ID;
        IF ( (v_start_date != TO_DATE(:P51_START_DATE,'DD-MON-YYYY') OR v_end_date != TO_DATE(:P51_END_DATE,'DD-MON-YYYY') ) AND
              :P51_CHANGE_REASON IS NULL ) THEN
            RETURN 'Change Reason must have a value';
        END IF;
    END;
    The Issue
    I tried to create another Dynamic Action to hide the P51_CHANGE_REASON and P51_CHANGE_DESC fields on page load, but when either of the date fields are changed and the validation is fired the P51_CHANGE_REASON and P51_CHANGE_DESC are hidden again.
    There are two buttons to submit the page: 'SAVE' will submit the page and stay on the page and 'SAVE_CHANGES' will submit the page and branch to the previous page (which is a report with EDIT buttons to edit the record).
    I can't get the page load Dynamic Action to NOT fire when the validation is fired.
    I hope this is clear and if not what information can I provide?
    Thanks,
    Joe

    Phil,
    Thank you for looking at this.
    Yes if the Change Reason is NULL when the edit page is displayed then the Change Reason and Change Description fields are hidden. If the Start Date (Datepicker) and/or End Date (Datepicker) change then display the Change Reason (Select List) and Change Description (Textbox). If the page is saved without entering a Change Reason display a validation error message that the Change Reason cannot be empty (NULL).
    The problem I'm having is that if no Change Reason is entered and the page is saved thereby firing the validation the Change Reason and Change Description fields are hidden again (because of the On-Load Dynamic Action to hide them). So now the user can't put in a Change Reason...unless they change one of the date fields again which isn't going to be accepted.
    Is there a way to determine if a validation error was fired and be able to use that on the On-Load Dynamic Action to hide the two fields? Something like...If the validation fired then don't run?
    Please let me know if I'm still confusing you.
    Thanks,
    Joe

  • Name of the table where can get the two fields Valid-From and Valid-to for

    Hi gurus
    I want name of the table where I can get the two fields Valid-From and Valid-To and their relation ship with the header table in BOM
    Regards
    Kaisar

    You can only get the Valid from date from the table STKO.
    To get the valid to date, you have to take one day less than the valid-from date of the next record for the same BOM.
    Alternatively use the Function module:
    CSAP_MAT_BOM_READ
    It will give both valid from and valid to dates in the tables parameter: T_STKO
    Regards,
    Ravi
    Edited by: Ravi Kanth Talagana on Jul 2, 2008 4:37 PM

  • File Browse Item and validation

    Hello
    I have a page with multiple items and validations.
    One of the items is "File Browse..."
    When I select a file on my computer and submit the page, a new record is created in "APEX_APPLICATION_FILES".
    In the page I have a process that saves the blob from "APEX_APPLICATION_FILES" into one of my DB table and then I delete that record.
    That is correct.
    But, if one of my validations is triggered, the record is still created in "APEX_APPLICATION_FILES" and since the validation blocks the execution of my process, the record is not deleted.
    Normally, it should be deleted to prevent the table from taking too much space.
    Is there any DB Job that "cleans" the table?
    Thank you
    Max

    Hi
    I just tough I could do the following validation as the very last one.
    Validation type:
    "Function returning error text"
    Validation Expression:
    begin
       delete from APEX_APPLICATION_FILES
       where name = :P1_MY_BROWSE_ITEM;
       return null;
    end;Condition :
    "Inline validation errors displayed"
    Is there a "cleaner" or better solution I should use ?
    Thanks
    Max

  • Valid from and Valid to are not getting copied to follow up document.

    Hi Experts,
    I am creating job quote as a follow up document from master quote.All are getting copied from the master quote to job quote,but valid from and valid to dates are not getting copied from master quote,instead it is calculating the date from date profile rules.
    But I need to transport the dates from Master Quote to Job Quote.
    Please advice.
    Thanks,
    Adi.

    Hi,
    You need to implement CRM_COPY_BADY for that. Please refer to:
    Re: create a new follow up complaint to the earlier completed complaint
    Regards,
    Nicolas.

  • Valid from and valid to properties under history preservation transform

    I have created_dt and last_updated both date columns in source table and also in target table.
    Now under history preservation transform for Date columns:
    For "Valid from" and "valid to" properties: which column should i pick?
    how can i use created_dt and last_updated columns under history preservation?
    What is current flag property, should i leave this blank if i don't have any flag "bit type" column like indicator in source or target table.
    My Dataflow has:
    Source_table -> Qry_Transform -> Table_comparison > history_preservation - > Key_gen - > Target_table.

    Valid from and Valid to in History Preservation transform deals with SCD (slowly changing dimensions).
    In most of the scenarios, Valid From comes from the source (as Effective From date) for which the dimension has a particular value.
    Eg:
    SALES REP, Region, Effective From
    A, California, 01.01.2011
    Valid To column in History Preservation is the default value that you provide inside. In case of preserving history of an update, Valid To column of the old record can have the Valid From value of the new record, or one day before that. You have option to set the same in History Preservation.

  • How are valid-from and valid-to dates set in TRPROD table in APO during CIF

    First question:
    How are the valid-from and valid-to dates set in the APO TRPROD table?
    For example, if I activate a transportaion lane model on March 1, 2008, will the valid-from and valid-to in TRPROD be 20080301 and 99991231?
    Or are these dates defined in the model itself? Or in APO config somewhere?
    Next question:
    Suppose I rerun the model on May 1 2008 to add some records that didn't get added in the March 1 run.  But suppose I want to back-date the valid-from of these records to March 1, rather than use May 1 as the valid-from.
    Can this be done?
    Or is the valid-from always the date of the CIF that creates the TRPROD records?
    Please advise. 
    Thanks

    Hi Srinivas -
    Thanks very much for replying so quickly, but your response didn't answer the questions.
    Let me try again.
    1)
    If I run a CIF on March 1 2008 based on a model that will generate APO TLane data, will the TRPROD valid-from and valid-to get automatically set to 20080301 and 99991231?
    2) 
    If the answer to this question is yes, then is it also true that if I run a new set of records in on May 1, 2008 (no duplications with the original set), then the valid-from and valid-to dates will be 20080501 and 99991231.
    3)
    But if (1) and (2) are both true (if you answer them both "yes", then suppose I want the May 1 record set to have valid-from dates of March 1 (for example, if the May 1 record set includes records that didn't get included in the March 1 set due to an error in selection criteria).  How do I get the valid-from to be March 1 when I run the CIF on May 1?
    On the other hand, if (1) and (2) are NOT true, then how DO the two dates get set during a CIF ????
    Thanks
    djh

Maybe you are looking for

  • PDF email attachments got stripped when sending to Blackberry

    Every time when I forward email with PDF file attachment from my Macbook Pro (IOS 10.6.8, Mail.app 4.5) to any Blackberry recipient it got stripped out!  On the contrary, that same attachment can be found on other browser with no problem.  I personal

  • Merge Repository- Finish button disable

    Hello there, i was trying to merge 2 repositories with no common parent. On step 2 of Merging the repository, i have selected the option Current/Modified in conflicts window, but still the Next/Finish button is not enabled. Is there anything i need t

  • Macbook Pro crashes everytime it wakes up from Sleep

    Hi all. I am experiencing a problem of crashes everytime I try to wake up the computer from sleep my Macbook Pro 2010, be it a long sleep or a short sleep. I did not have any problems at all on Mac OS X Lion and a week ago, I upgraded to Mountain Lio

  • Merging Multiple Kuler Accounts

    Somehow I think I have created multiple Kuler accounts over the years, all  user names are variations on my email addresses each containing llaferte AT somwhereDOTcom.  Can these be merged into one account? Also is there a way to Universally maintain

  • Problema encore dvd 2.0

    hola que tal, estoy haciendo un slideshow en encore dvd 2.0, ya lo cree, cambie el menu desde ps, inserte las fotos, sonido, todo perfecto, el proyecto ni tiene errores segun el reporte, el problema es cuando quiero grabarlo en una unidad de cd-rom,