How do I set only the first row of a DataGrid as the selected row?

I have a "Go" button on a search form that fetches data into an already data bound grid.  After the data is fetched, I want to make the first row in the Datagrid the selected row, as if the user clicked on it.  If the result set is empty, I don't want the code to crash.  (I only want one row to be able to be selected at a time)
            protected function btnGo_clickHandler(event:MouseEvent):void
                getSBJsResult.token = baa_data_svc.getSBJs(cmbSrch.text);
                grdSBJs. //  ?????  What goes here to select the first row?

This should do it.
If this post answered your question or helped, please mark it as such.
if(myDataGrid.dataProvider.length > 0){
  myDataGrid.selectedIndex = 0;

Similar Messages

  • Easy Question! How Do I Play ONLY the Selection, and then playback stops?

    How Do I Play ONLY the Selection, and then playback stops? (Same as subject..)
    Thanks! I'm loving STP so far. I came from Sony Sound Forge so it's been difficult finding something that can compare, but I think I have it now! Lot's of advantages for STP too.

    I think you're confusing the audio loops with MIDI loops. The blue loops are audio loops which will play only on audio tracks. You can't 'play' those with a keyboard because they are actual audio files. The green loops contain MIDI data that corresponds with a software instrument, and if you drop them onto a Software Instrument track, they will open that instrument which you CAN play with an external keyboard or the caps lock keyboard.
    I might be missing some loops, but when I searched for Bell Tower I found only one, and it is a blue loop. So it can only be played as an audio loop on an audio track. However, if it were a green loop, you would NOT drop it on an external MIDI track (I think that's what you're trying to do if you're dragging it onto the 'Grand Piano MIDI instrument'), but you would create a SOFTWARE INSTRUMENT track, and drag it on that. Any internal sounds you want to play from Logic's instrument you'll do from Software Instrument tracks, and not MIDI tracks.
    What you should do to find a good chime sound that you can play with the caps lock keyboard is to create a Software Instrument Track, open the Library tab, and search there for a good chime. This will search all of the instruments and presets that Logic has for all of its internal instruments. Try 'Tubular Bells' and see if that works for you.
    If you need to use the bells from that loop, do what SC suggested, and take the hits from the audio file and load them into a sampler. Then you can play them the way you want to. If you don't know how to make a sampler, it's a bit complicated. Look up EXS24 in the manual, or check out
    http://www.youtube.com/user/SFLogicNinja
    I think he has a video or two on EXS24

  • How do i set up the time capsule with only a wireless net work? it keeps asking me to plug in a cable and i do not have one.

    how do i set up the time capsule with only a wireless net work? it keeps asking me to plug in a cable and i do not have one.

    Are you using a v6 uitlity.. because it is a toy.. ??
    Get v5 utility and then you can hold down the option key and select the right mode.
    If you have lion, just install it.. For ML follow this.
    How to load 5.6 into ML.
    1. Download 5.6 for Lion.
    http://support.apple.com/kb/DL1482
    Click to open the dmg but do not attempt to install the pkg.. it won't work anyway.
    2. Download and install unpkg.
    http://www.timdoug.com/unpkg/
    Run unpkg on the desktop.. it is very simple.. drag the AirPortUtility56.pkg file over to unpkg.. and it will create a new directory of the same name on the desktop.. drill down.. applications utilities .. there lo and behold is Airport utility 5.6 .. drag it to your main utilities directory or just run it from current location.
    You cannot uninstall 6.1 so don't try.. and you cannot or should not run them both at the same time.. so just ignore the toyland version.. the plastic hammer.. and start using 5.6.. a real tool.

  • I have two time capsules, one for work and one for home, how do I set up the work time capsule to only back up my work files?

    I have two time capsules, one for work and one for home, how do I set up the work time capsule to only back up my work files?  Also, how do I add co-workers to my work time capsule and wife to my home time capsule?  Thank you!

    You cannot have two different TC setups.. at least until Mountain Lion.. it did introduce some changes but I am not sure if you can setup two different configurations for TM.. you can use two different devices to back up to. I doubt this will help you.
    You might be better using a real backup software.. superduper, CCC, chronosync etc.
    The TC by default is available to any Mac in the network to do backups. TM will sort itself out and put each computer on a different backup. These are kept in separate sparsebundles.. so that is all fine.

  • How I can set up the DynDns inside the Time capsule, or only with the Time capsule I have external access from a PC for ex.?

    How I can set up the DynDns inside the Time capsule, or only with the Time capsule I have external access from a PC for ex.?

    MobileMe service is finished.. to get remote access to the Mac or TC you use iCloud account.. but that is for files.. not to access web cams.
    Without dyndns client in the TC, you can perhaps run dyndns on the computer or video recorder..many of these will have clients built into them.
    Even better get a static Public IP from your ISP.. that is the correct professional way to do it.
    Or you can use whatever broadband modem you have and remove the TC as the main router.. simply bridge it. Use your adsl router for connection. Almost all adsl have built in dyndns.
    Sorry your language is very hard to follow.. and I am sure you are finding my answers similarly difficult.
    Basically the TC is about the hardest device to setup because it is lacking important networking functions.
    Get a vpn router and use vpn connection is far superior to any other method. But you cannot do it with TC.

  • Result Set only returning one row...

    When I run the following query in my program, I only get one row.
    SELECT * FROM (SELECT * FROM ul_common_log_event WHERE application_name = 'Configuration' ORDER BY cle_id DESC) WHERE ROWNUM <= 500;
    However when I run it in TOAD, I get all the rows I am looking for.
    Here's my java
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    My record set only contain one row. I am using Oracle 9 OCI driver BTW.
    Any ideas? Thanks!

    Good thinking. That was the first thing I tried. That was not the problem. It turns out that I was stomping my rs object in another method. Problem resolved!
    Thanks for the reply!

  • I have two children each with an ipod which has FaceTime - I have the iphone 4s with FaceTime.  All of these devices are connected to itunes through the one account.  How do I set up the FaceTime on the two ipods so as it doesn't ring both of them?

    I have two children each with an ipod which has FaceTime - I have the iphone 4s with FaceTime.  All of these devices are connected to itunes through the one account.  How do I set up the FaceTime on the two ipods so as it doesn't ring both of them?

    I started to do that then it said that this will become their apple I.D or similar and then I thought that will disconnect them from the same iTunes?  I want them still on my iTunes as they are only young (8 and 10)?  Or have I got this all wrong and even if I do set them up with a different e-mail will they still be on my itunes?  For example if they want to purchase an App will it still go through my account even if they use their ipod?

  • How can I print only the attachment without the email content

    How can I print only the attachment without the email content. Every time I send to print, It prints the email itself with the attachment- can I cancel that?

    Hello Riklama,
    When you first open the attachment (e.g. on your phone) than you can mail only that attachment. Works fine with my husbands blackberry.
    Elsy

  • How can I keep only the emails I want.  Once I delete them I dont want them popping up again.  .

    How can I keep only the emails I want.  Once I delete them I don't want them popping up.  How can I loer the "50 recent" minimum?  Thanks

    For IMAP mail only
    Delete message permanently
    Settings>Mail......>tap the little arrow on right of mail account>Archive Messages>OFF
    You can't set it to less than 50 Recent Messages.

  • How do I set up the email settings

    How do I set up the email settings, so the Phone will catch all my junk mail and put it in the junk mail folder? I have a yahoo email account if it matters.

    If the account is a POP account that can't be accessed as an IMAP account with an email client on your computer as well as with the iPhone's Mail client, the same is not possible.
    The iTunes sync process for email accounts is for transferring email account setup information only - from your computer to your iPhone. This does not sync account mailboxes and messages.
    The only way to keep account mailboxes synchronized with the server when accessing an account with an email client on multiple computers or devices such as the iPhone, is with an IMAP account. A POP account is designed to be accessed with a single email client. An IMAP account is designed to be accessed with an email client on multiple computers or devices.
    A free Yahoo account provided for iPhone customers, which can be accessed as an IMAP account with the iPhone's Mail client, cannot be accessed with an email client on your computer.

  • Using an own function in a select how can i set that the function run once?

    Hi
    Using an own function in a select how can i set that the function run once, not in every row?
    Please help me
    Thanks
    Viktor

    Something like this ?
    SQL> select * from dept;
        DEPTNO DNAME                          LOC
            10 ACCOUNTING                     NEW YORK
            20 RESEARCH                       DALLAS
            30 SALES                          CHICAGO
            40 OPERATIONS                     BOSTON
    SQL> create or replace function ret_name (deptnum in number) return varchar2
      2  is
      3     name    varchar2(50);
      4  begin
      5     select dname into name
      6     from dept
      7     where deptno=deptnum;
      8     return name;
      9  exception
    10     when no_data_found then
    11             return('Not existent deptno');
    12* end;
    SQL> /
    Function created.
    SQL> select deptno, decode(rownum,1,ret_name(deptno),null) dname from dept;
        DEPTNO DNAME
            10 ACCOUNTING
            20
            30
            40
    SQL>

  • How do you set up the passbook?

    How do you set up the Passbook with the new iOS6 software?

    I would highly suggest searching the community before posting in this case since this discussion is currently going on in a lot of threads.   Long answer short - wait for your apps to be updated by the developers and then you can link them - as of right now, only Fandago and Walgreens have update.

  • How to get only the selected layer data?

    Hi All,
              I'm using dissolve sample plugin. I added two layers in photoshop both of different dimensions, say 1000 * 1000 & 2000 * 2000. Now I select the layer with 1000 * 1000 dimension and click on Dissolve plugin. The preview image what is shown in dissolve plugin dialog is not just the selected layer, but also some extra pixels around the selected layer.
    Do I need to set any flag for getting only selected layer data to display in preview?
    Also I need to get only the selected area in a particular layer. When I checked FilterRecordPtr, haveMask flag is TRUE if the part of the layer is selected. But how do I get only the part of the layer that is selected for displaying preview image?
    Please let me know if the description is not clear.
    Thanks,
    Dheeraj

    Thanks Tom Ruark for the response.
    That is exactly the same thing what I'm seeing.
    1.Is there a direct way to know the bounds of the layer without the transparency grid so that I can show only the layer?
    2. If I select an area of 50*50 within a layer(1000*1000) using Rectangular Marquee tool, then I want only that selected area to be shown in preview. For this there is a haveMask flag which indicates whether or not there is selection, but the selected bounds are not available. I'm currently calculating the bounds. I just wanted to know if Photoshop SDK has any field for getting the bounds?

  • How can I sync ONLY the top photo in the stack?

    I sync various Aperture photo albums to my IPad and iPhone. The problem is that when I have 'stacked' images (eg. one image showing in the album and two other copies 'hidden' underneath), all of the photos in the stack are copied to the ipad and iPhone. So instead of seeing just one version of an image, I see as many as are in the stack. How can I sync ONLY the top photo in the stack?
    Thanks for your help!

    I solved my own problem.
    The sync problem seemed to only occur on smart albums. There is a new check box option in Aperture 3 when making a smart album: "sync stack pick only." One click and the problem is solved!

  • How can I print ONLY the active document?

    Whenever I go to File/Print the darn PSE 9 program sends all of the working files in the bin to the printer. I've searched online for 2 hours now looking for an answer.
    I like to work with having several to many files in the 'bin' and prefer to only print the active file I'm currently working on without having to close the 'working files' before I can print. How can I print ONLY the active document or file in the project bin? Please help, I've upgraded from PSE 3 to PSE 9 and really like the updated features, but this one pain in the neck default is getting the best of me.

    Thanks for your help, that works nicely. It is good to have control of the printer again.

Maybe you are looking for

  • Windows 8.1, BootCamp does not find the ISO image.

    When I try to install Windows 8.1, BootCamp does not find the ISO image. I purchased Windows 8.1 Pro, I downloaded the .exe requested file from a Windows computer, performed the steps recommended by Microsoft in order to create the ISO file saving it

  • Skype's Downfall

    Dear Skype Members, I wish to share my personal experience and opinion on Skype's progression and how it has affected me. First of all I am a long time Skype user so I go way back to 2006: i was a client way before the transition and sale to Microsof

  • Problem with call form built_in - SOLVED

    Hi all. I'm on devsuite 10g. I would know where local on my machine I must put the *.fmx files of two forms; I have a form A that calls a form B using call_form('B'); statement. But I receive an error FRM-40010: Cannot read form B. I have got both fo

  • Microsoft Apps SW Update / Nokia700

    Last week i checked if there is any sw updates and saw "Microsoft Apps". I started downloading the update, and somewhat it stopped installing and gave the message below. "unfortunately there was a problem getting your updates. you can use your 700 as

  • Probably off-topic: ripping DVDs to import in iTunes to play in FrontRow

    I wasn't sure which forum to post this in but since iTune is right in the middle of it I figured it was as good a place as any. I'm new to Mac OS and just purchased an intel based mini. I'd like to rip my DVDs onto the disc so I can access them throu