Without data in textfield and datagrid if i click add or delete button it should through msgbox

hi friends ,,
                 i am new to flex i am doing a application in flex4,i need help from this, i have two text inputs and one datagrid, and one add button and delete button.
my requirement is without data if i click add or delete it should through error box how to do that,
In 3 condtition it should  thorugh error or msg box;
conditions are,
                  1.both textinputs and datagrid----> click (add or delete)--->error or msg box
                   2.both textinputs dont have value and datagrid have values----> click (add or delete)--->error or msg box
                   3..both textinputs  have value and datagrid  dont have values----> click (add or delete)--->error or msg box
any suggession or snippet code are welcome
Thanks in advance,
B.venkatesan.

Hi,
Please try following code:
<?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">
 <fx:Declarations>
 <!-- Place non-visual elements (e.g., services, value objects) here -->
 </fx:Declarations>
 <fx:Script>
<![CDATA[
 import mx.collections.ArrayCollection; 
import mx.controls.Alert; 
public function check():void{ 
if(input1.text=="" || input2.text=="" || Dg1.dataProvider==""){
Alert.show(
"Enter the text boxes and DataGrid.");}
else{Alert.show(
"Do not Enter the text boxes DataGrid."); 
]]>
</fx:Script>
 <s:TextInput x="77" y="107" id="input1"/>
 <s:TextInput x="254" y="107" id="input2"/>
 <mx:DataGrid x="80" y="150" id="Dg1">
 <mx:ArrayCollection>
 </mx:ArrayCollection>
 </mx:DataGrid>
 <s:Button x="95" y="329" label="Add" click="check()" />
 <s:Button x="290" y="329" label="Delete" click="check()"/></s:Application>
I am keeping Arraycollection empty for example.Please try when you provide data to Arraycollection.
Thanks and Regards,
Vibhuti Gosavi | [email protected] | www.infocepts.com

Similar Messages

  • I just bought an iPad and each time I click on the iTunes button it says "cannot connect to iTunes" I need help on this urgently

    I just bought an iPad2 and each time I click on the iTunes button it says "cannot connect to iTunes" I need help on this urgently

    Try a Reset...
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    Basic troubleshooting
    From Here
    http://www.apple.com/support/ipad/basics/

  • I LEFT MY IPOD5G TOUCH without charging for days and now when iput it to charge it doesnt what should i do buy a new battery or is it dead ? where can i buy a new batttery

    i left my ipod 5g touch without charging for days and now when i put it in the charger it doesnt charge does it need a new battery or dead ?? where can i buy a new battery in egypt?

    Try:                           
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     
    and maybe:
    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar 

  • Datagrid disappering on clicking while using popup button

    Hi,
    I have a popup button, which on opening presents a datagrid
    control. i can scroll through the datagrid.
    Problem is that if i accidentally click on the datagrid, the
    datagrid disappears back under the pop up button. Is there a way i
    can have it stop doing this and allow me to click through items in
    the datagrid without closing.
    I wanted the datagrid to close when an item is double
    clicked, so i had the double click property of the datagrid enabled
    but the problem again was if i had a single click on the datagrid
    it would close :(
    any suggetions?
    many thanks,
    abhi

    Manoj,
    I have tried out a prototype for this one. It seems to work but involves an extra button that user has to click.
    When the user selects the value from the combo box,instead of pushing the value to its destination, collect it in a cell say B2.
    use a toggle button from the components. when u click on ON in toggle button it pushes a 1 to the destination specified say C1.
    The destination cell where the combo box is feeding the selection has a formula like this E1=IF(C1=1,B2,D1). Note that D1 is a cell which populates blank value to ur combo box destination. it has the formula =""
    with the above set up: the user selects the value in the combo box and then clicks on the toggle button only then the value from combo box is placed at the combo box destination(E1).
    But the problem with the above set up is that the toggle button remains in the ON status once selected, pushing further selection in the destination with out the involvement of the toggle button.
    To overcome this pull in a RESET button clicking which it resets the status of the toggle to OFF again. this is the extra button I was referring to.
    Hope it helps!
    Thanks,
    Karthik

  • ICal 4.0 and Snow Leopard: can't add / edit / delete events + workaround

    Hi,
    iCal 4.0 under 10.6.1, any changes I made in iCal was reversed when I quit and reopened iCal. Plus my changes didn't sync to my iPod.
    When looking at the Console.app, I saw:
    2009/09/15 13:31:51 iCal[11918] save failed: Error Domain=CalCalendarStorePersistenceErrorDomain Code=1 UserInfo=0x115d4c780 "The end date can’t be set to occur before the start date. Change the end or start date." {
    NSLocalizedDescription = "The end date can\U2019t be set to occur before the start date. Change the end or start date.";
    I tried to export / delete / import all my calendars, that didn't help. Then I noticed I also have the calendar automatically generated for the birthdays from my address book.
    I unchecked "Show Birthdays calendar" from the General preferences. Now iCal works again (I can add / edit / delete events and the error message doesn't show in the Console.app anymore)
    Cheers,
    Janus

    I have updated my OS to 10.9 hoping this to fix my problem.... but nothing... It's still the same....

  • Error in fetching the data from textfield and inserting to the database..

    I'm using Java Swing as front end and MySQL as backend using the netbeans ide..I am trying to fetch the data from the textfiled in the form and insert to the database table.i've skipped the generated code..In the following code i get the erro cannot find symbol "stmt" in the actionPerformed method..
    mport java.awt.event.*;
    import java.sql.*;
    public class BarcodeReader extends JFrame implements ActionListener {
    public BarcodeReader() {
    initComponents();
    nb.addActionListener(this);
    public void jdbcConnect(){
    Connection con=null;
    String url = "jdbc:mysql://localhost:3306/";
    String db = "mynewdatabase";
    String driver = "com.mysql.jdbc.Driver";
    String user = "usrname";
    String pass = "pwd";
    try{
    String s=newtxt.getText();
    con=DriverManager.getConnection(url + db, user, pass);
    Statement stmt=con.createStatement();
    Class.forName(driver);
    public void actionPerformed(ActionEvent e){
    try{
    jdbcConnect();
    stmt.executeUpdate("INSERT into machine(mname) values '"+jTextField1.getText()+"'");
    }}catch (Exception ex) {
    System.out.println(ex);
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new BarcodeReader().setVisible(true);
    }

    There are far too many errors to try and clear.
    For one, the exception references the actionPerformed method (according to your text), so why is that not shown here?
    For another you are performing, possible time-consuming, actions, and even worse IO actions, on the event thread, which is a huge no-no.
    You are not closeing your resources properly, if at all, which is another huge no-no.
    You are completely mixing your "view" (the gui), and your "model" (the data related classes), which is another huge no-no.
    etc, etc, etc.

  • Any way to remove rows without data so groupings and formulas can remain?

    Hi all,
    Does anyone know of a way (using a macro/Vba code) to remove zero or #missing rows from a spreadsheet so that groupings and formulas remain intact? Simple example:
    7183.2224.0000     2000
    7183 Misc Exp 1     2000
    7430.2220.0000     0
    7430.2221.0000     1000
    7430.2222.0000     0
    7430.2223.0000     3000
    7430 Misc Exp 2     4000
    Phase I Total     6000
    How can I delete 7430.2220.0000 and 7430.2222.0000 from the above and keep formulas?
    Thanks in advance.

    it would be easy to write a macro that deletes dows where the value is missing or zero. If in the macro you delete the row, depending on how you wrote the formula it should adjust. (like summing a range instead of hard coding + signs) an easy way to create a macro like this is to manually do it while recording the macro , then you can add logic to it to look at all cells
    Edited by: GlennS_3 on Jul 6, 2011 2:29 PM

  • I cant register my iPad without a credit card and I don't have a credit card. What should I do?

    Iam a student and i dont posses a credit card right now but i want to register my ipad without a credit card how do i do it?

    Create an iTune Store Account without credit card
    http://support.apple.com/kb/ht2534

  • How to perform expand and collapse operation on click of link or button

    Hi
    Is there anyway by which i can perform expand and collapse operation over a table on click of a command link or button without using show details component.
    Is there any other alternative to show detail.
    I do not want to use show detail because of the following reason.
    I have got a page where in i pass some parameters to the URL based on which details get displayed on the page.
    Now when i pass a parameter, change the parameter, once again send the previously used parameter(i,e the parameter that i passed initially), values in the table under show detail do not show any change in values.
    Once i pass values which i have already passed, values in the table under show detail component do not refreshed.
    If anyone has encountered with similar situation, then please post me reply's as to how you could over come the problem??

    Hi
    Perhaps you could use an on-demand application process instead - you can specify these in the URL.
    The URL syntax (for your link) would be like...
    f?p=application_id:page_id:session:APPLICATION_PROCESS=process_idIs this what you mean?
    Cheers
    Ben

  • I want to create xml file using photoshop script and also i can easily add, modify, delete based on file name

    Hi,
    Please help me for this.
    I need to create XML file for mentioned below. when i run the photoshop script i need deatails for active document name, date, time and status.
    <?xml version="1.0" encoding="UTF-8"?>
    <sample>
    <filename>Cradboard_Boxes_Small.tif</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    <sample>
    <filename>Cardboard_Boxes_Student_Vaue_Pack.jpg</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    I need read that xml after creating and modify based on file name. i need to modify status after file finished.
    if the file name is already exist i want to modify or delete or add whatever i need.
    Kindly help me simple way

    You may want to look into getting Xtools ps-scripts - Browse Files at SourceForge.net then.  Most of the support is for ActionManager script code where XML code is use as an intermediate step.  There are quite a few Photoshop script in XTools .   Ross Huitt is an expert javascript programmer though is is fed up with Adobe's lack of support for Photoshop scripting particularly the bugs in ScriptUI he is still maintaining tool he  has created for us free of charge. Tools like Image Processor Pro. None of his scripts are save as binary so you can read all of his code there is a wealth of knowledge in there....
    Also there is a scripting forum Photoshop Scripting

  • Regarding - Http and Datagrid

    hi,
    In Flex I place datagrid in my page and add checkbox in datagrid row   as a Itemrenderer.  Now i need to delete those rows which are checked in grid and gets   deleted on click of the DELETE button. But i am not able to get  deleted  in grid as well as database.
    Please provide me the solution to solve the problem.
    Thanks and Regards,
    venkat.R

    hi,
    Thanks for your kind reply.The following code is not working .please provide me solution to solve the problem.
    My question is how i get the multiple selected checkbox value in httpservice and database in php.
    The following code shows
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="userRequest.send()">
    <mx:HTTPService id="userRequest" method="POST" useProxy="false"
    url="check.php" result="Display(event)">
         <mx:request xmlns="">
             <memid>{uRequest.selectedItem.userid}</memid>
         </mx:request>
    </mx:HTTPService>
    <mx:Script>
         <![CDATA[
             import mx.events.ListEvent;
             import mx.rpc.events.ResultEvent;
             import mx.collections.ArrayCollection;
             import mx.controls.Alert;
             import mx.controls.DataGrid;
             [Bindable]private var arr:ArrayCollection;
             private function Display(event:ResultEvent):void{
                 arr=event.result.users.user;
             private function handleSelect(value:Boolean):void
                     userRequest.lastResult.users.user.source.forEach(
                         function callback(item:*, index:int,
    array:Array):void
                             item.sel = value;
                     userRequest.lastResult.users.user.refresh();
                 private function Update():void{
                     userRequest.send();
        ]]>
    </mx:Script>
    <mx:DataGrid dataProvider="{arr}" id="uRequest" >
    <mx:columns>
    <mx:DataGridColumn>
         <mx:itemRenderer>
         <mx:Component>
             <mx:CheckBox selected="{data.sel}">
            </mx:CheckBox>
         </mx:Component>
    </mx:itemRenderer>
        </mx:DataGridColumn>
        <mx:DataGridColumn headerText="Sl.No" dataField="userid"></
    mx:DataGridColumn>
             <mx:DataGridColumn dataField="username">
            </mx:DataGridColumn>
             <mx:DataGridColumn dataField="useremail">
            </mx:DataGridColumn>
             <mx:DataGridColumn dataField="userstate">
            </mx:DataGridColumn>
        </mx:columns>
    </mx:DataGrid>
    <mx:Button label="CheckAll" click="handleSelect(true)">
    </mx:Button>
    <mx:Button label="Update" click="Update()">
    </mx:Button>
    </mx:Application>
    //My Database Query
    if($_POST['memid']!=''){
            $id=implode(',',$_POST['memid']);
            $ids=substr($id,0,20);
            $ans="update tbl_member set member_lname='example' where member_id
    in($ids)";
             $res=mysql_query($ans);
            $answer="select * from tbl_member";
             $result=mysql_query($answer);
            print "<users>";
            while($row=mysql_fetch_object($result)){
            print "<user>
             <userid>".$row->member_id."</userid>
             <username>".$row->member_fname."</username>
             <useremail>".$row->member_lname."</useremail>
             <userstate>".$row->member_state."</userstate>
             </user>";
            print"</users>";
    Please provide me the solution to solve the problem.
    Thanks and Regards,
    venkat.R

  • BAPI to update data in KNA1 and ADR* tables

    Hi,
    I have to change customer data via BAPI.
    I'm searching for a BAPI that updates KNA1 and ADR* tables.
    (so that data will be coherent).
    I found BAPI_CUSTOMER_CHANGEFROMDATA1 but it seems to only update KNA1
    and BAPI_ADDRESSORG_CHANGE that only updates ADR* tables.
    Can you help me ?
    Thanks,
    Sandrine.

    I came accross such a requirement but couldn't find a single function module.
    I think try using both the FM's else BDC is the only option left.
    you can use the FM "DEBITOR_BDCDATA" to get the BDC data for vendor and then edit it to add the address fields required.

  • Schedule line delivery date on saturday  and sunday its confirm for monday

    HI Experts
    in cash sales process or normal OR also  when i create sales order monday its work fine system take todays (current date) as delivery date and i can do delivery on same date
    but if i create sales order on saturday system take coming monday as delivery date and give goods confirmation on monday date  but iif i change manually system allow me to change the date for saturday and i can do delivery but i want it system should take delivery date as saturday (same date only )
    because in my client there is no holiday all 365 as working day
    in VOV8 its blank no lead time
    factory calendor and logistic i define as all 7 days as working day
    and sales org and plant i assign calendor
    Please guide me where i miss and how can i solve this issue
    thanks in advance

    Hi,
        Check "OVLY" and "OVLZ" and If the sceduling is active for he shipping point /sales document type.  Check "OVXD" and see If the Loading time/ Pick/pack time is determined from it. If they are getting determined from shipping point check the shipping point calender in "SCAL" .If it has saturday and sunday as holidays ,then you may have to change them. And check If the customer has goods recieving hours assigned to him (In customer master unloading point). If he has only 5 working days and If he accepts only goods at 8 am in the morining then system would propose like this.Kindly please let me know If you need any more Information on this.
    Regards
    Ram Pedarla

  • IPhoto and Frontrow: can not click and drag after using frontrow slide show

    Recently I received my new MacBook Pro, I started using iPhoto and noticed the following problem:
    1. Open iPhoto and perform normal tasks, click and drag photos, etc.
    2. Close i-Photo
    3. Open Frontrow Slide Show(Pictures)- play for a few seconds
    4. Close Frontrow
    5. Reopen i-Photo and photos will not move(click/drag)
    6. Close i-Photo/reopen and all is fine
    Anyone else???
    Thanks!
    MacBook Pro   Mac OS X (10.4.9)  

    I discover that there is no parameter to set slide duration
    Using the Finder, drag all the images from the folder containing the images on to the Navigator pane ion Keynote, this will place the images centred on an individual slide
    with at least one image selected in the Navigator, select all, (command A)
    Inspector > Animate > Start transition: in the drop down menu, select:   Automatically
    seethe delay to the time you want the image to appear on screen, you can select individual times by selecting one slide at a time
    and no choice of slide transition and timing
    Inspector > Animate, click Add an Effect
    The Inspector is the side panel on the right hand side of the canvas
    All Apple applications have a very useful Help system located on the Menu bar > Help

  • How to add a push button(download) to my ALV Report to download report data

    Hi,
    I developed a normal alv report and now i want to add a push button ex.. download in the report output and then whwnever I am clicking this download button then download functionality will work.Please don't take it as simple from my point of view it is very imp. for me please help me.
    Thanks.

    Hi,
    Please check the below thread
    Re: ADD button to ALV Grid
    Thanks
    Arul

Maybe you are looking for

  • Need Help!! How can I transfer my entire MediaCenter?

    My old laptop has broken down and I have no current backup of my iTunesMedia. Anyway, is there a possibility to transfer my entire mediacenter to my new laptop or not? I looked for a solution in many communities, but the only thing I read is that I c

  • Getting an error message when I convert to .WMV

    So I have my project all done, I got to convert to a WMV file, and then it pops up the error message of "Insonsistent Audio Sample Rate" "The media you are exporting contains audio with multiple sample rates." Now when I check the sample rates on eve

  • Changing file information quest

    I have the Rhapsody To Go service, which allows me to transfer as much music as I want for 5 bucks a month. This service also does the music transferring for me, no Creative Mediasource required. So my question is:?After transferring music to my play

  • Change log for OKB9

    Hi Experts, I want to see what all changes have been made in OKB9 and when. but when i click on change log. nothing appears. it says that log is swithed off. How to switch on the log. please help. Thanks, Sonali Edited by: kaustubh kabre on Sep 10, 2

  • No video download helper black arrow

    Where did the black arrow for download helper go? I have used it for years and it no longer appears. Can't download. Help........