Set focus in Data tabel

hi all,
i am doing dynamic row addition in datatable and when new row is added focus was gone into the first row of the table but i want to set it into newly added row.. plz help me....its urgent

Use Javascript.

Similar Messages

  • Cannot set focus when reset data using datasets

    Hi All,
    When I click reset form button. I would like to reset data then focus to the first field. I can clear information I provided but setFocus to the first name field is not working. Please help.
    I use datasets to reset data. 
    Here is my coding:
    event: click
    xfa.datasets.data.loadXML("<form1/>", true, true);
      xfa.host.setFocus("xfa.form1.contactInformation.firstname")
    Thanks,
    Cindy

    I tested the clear button. But it is not set Focus to the first field. It is not successful.

  • Setting Focus In Textarea

    Ok,
    I have a java program I've bundled into a jar and then packaged into a Win32 executable. I have windows associate a particular filetype (.wri) to my program.
    When I click a .wri file and open it, it loads data to a textarea. Now when I scroll down the textarea and finally click in the textarea, it resets me to the top of the textarea. Now, if I open the executable first, then go through the program to open a .wri file, I can scroll down to the bottom of the textarea, click in the textarea and I do not get reset to the beginning. I need a way to prevent the resetting of the textarea. I've tried using some of the Window methods for setting Focus, but none seem to work. Any ideas why this is happening via the one way and not the other. I'm open to any ideas. This known bug frustrates many because the .wri files being opened have over 1000 lines of text. Thanks in advance!

    i think yu can use setFocus by using lostFocus event.
    use Focuslost()

  • How to set focus and mark red on certain select option field

    hi experts
    I embedded a select_option view in my application and  tried to use IF_WD_SELECT_OPTIONS->request_focus to set focus on a certain select option field if the logical check failed, and also hope the low field of the select option can be marked red....but things does not happen that way....
    could anyone kindly tell me how to implement that requirement?
    tkx and regards
    sun

    What is the problem you are facing in this ?
    Requesting focus is easy.
    just call the method request focus and pass the id of the parameter whose lower value field you want to focus.
    as shown below.
    code you might have written in wddoinit
    DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.
        DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    *   * create the used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
        WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
        WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'ZDEALERID' ).
    * * add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'ID'
      IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    code for focusing a field.
    wd_this->m_handler->request_focus( i_id = 'ID' ).
    you must have declared attributes m_handler and m_wd_select_options type reffering to IF_WD_SELECT_OPTIONS and
    IWCI_WDR_SELECT_OPTIONS respectively.
    and regarding that red color i am not sure it is possible without using message manager.
    thanks
    sarbjeet

  • How to set focus on UI Element

    Hi All,
    I am using the below code to set the focus on the first row of the table given in the link  [How to set focus at UI element ? ] on enter of an event.
    data: lr_elem type ref to if_wd_view_element.
    lr_elem = view->get_element( <ID of the Link to Action field>).
    if lr_elem is bound.
    view->request_focus_on_view_elem( lr_elem ).
    endif.
    I am getting "Cannot use NULL reference as object error at view".
    Can you please tell me how to get the reference of the "view".
    Thanks
    Praveen

    >
    praveenkumar_81 wrote:
    > Hi All,
    >
    > I am using the below code to set the focus on the first row of the table given in the link  [How to set focus at UI element ? ] on enter of an event.
    >
    >
    data: lr_elem type ref to if_wd_view_element.
    > lr_elem = view->get_element( <ID of the Link to Action field>).
    >
    > if lr_elem is bound.
    > view->request_focus_on_view_elem( lr_elem ).
    > endif.
    >
    > I am getting "Cannot use NULL reference as object error at view".
    >
    > Can you please tell me how to get the reference of the "view".
    >
    > Thanks
    > Praveen
    Hallo Praveen,
    have you controlled that id of the Linktoaction ? there you made error.
    See it in the ViewElement designer .
    should be something like this
    lr_elem = view->get_element( 'LTA_name ' ).

  • How  to set focus on an element inside a datatable on load

    How to set focus on an element inside a datatable on load

    Check out https://blogs.oracle.com/groundside/entry/ever_wondered_how_uncommitteddatawarning_works and
    Decompiling ADF Binaries: Checking for dirty data
    Timo

  • Setting focus to a menu item in New Form Instance...

    Dear All,
    Please let me know how to set focus to a menu item in New Form Instance trigger,
    so that as the user opens the form control should be with the menu item and not with the First item of Data Block.

    To my knowledge you cannot set input focus to a menu item.
    Alternatively you could create a push button and put input focus there.
    hth
    Hans

  • Refresh ALV & set focus

    Hi,
       I have a refresh option on my screen. It will bring latest data from database. After displaying data in ALV and scrolling down (lets assume scrolled down 10 records). if I select refresh, I am reloading data to ALV. But focus is going to first record. I have again scrool down to 11th record to check the data. How I can set focus to 11th record after repopulating data on ALV. I am using classes for ALV.
    I will appriciate any inputs.
    Regards,
    Venkat.

    Hi,
    Check this example of using the method set_current_cell_via_id.
        DATA: ROWNO TYPE LVC_S_ROID.
        ROWNO-ROW_ID = 25.
    Set the focus on the row number 25.
        CALL METHOD <b>grid1->set_current_cell_via_id</b>
          EXPORTING
            IS_ROW_NO    = rowno.
    Hope this helps..
    THanks,
    Naren

  • Set Focus to a cell in ALV on action performed outside ALV

    Hi All,
    In my application i have created a dynamic ALV using technical structures.
    I have few fixed columns and few scrollable columns.
    The scrollable columns represents dates. The caption of the ALV headers are set later with the dates.
    I have a date navigator control. On choosing a date, the headers of date columns changes.
    Table layout is fixed with 4 displayed scrollable columns displayed each time.
    Issue:
    When i use horizontal scroll on ALV and then navigate on a date, then the ALV headers are updated. But the scroll position is not changed. I would want to focus on the first date column.
    I tried 2 options to set focus. But both dont seem to work.
    Could you provide me some suggestions?
    Option 1:
      CALL METHOD lo_view->if_wd_view_controller~request_focus
        EXPORTING
          context_element = lo_el_time_ps            " i get the element reference for the right index )
          attribute       = lv_attribute_name            "first date column name (technical name)
    Option 2:
    lo_interfacecontroller = wd_this->wd_cpifc_alv_usage1( ).
    lo_interfacecontroller->set_focus(
                                      index = lv_index                       " i get the element reference for the right index )
                                     column = lv_attribute_name ).   "first date column name (technical name)
    Regards,
    Rekha

    hi Carles Costa,
    i think your issue is type of Purchase document. if it is Item type then matrix (38) and column(1) is itemcode,
    if service type then matrix(39) and column 1 is Description.
    this code oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Click() or oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Click(BoCellClickType.ct_Regular) is correct.
    hope this help you.
    thanks
    H2

  • [svn] 3493: Fix bug setting focus into an A. 2 application that is in a dialog.

    Revision: 3493
    Author: [email protected]
    Date: 2008-10-06 13:40:22 -0700 (Mon, 06 Oct 2008)
    Log Message:
    Fix bug setting focus into an A.2 application that is in a dialog.
    QE: YES
    Doc:
    Checkintests: Marshall Plan mustella tests
    Reviewer: Carol
    Bugs: SDK-17177
    SystemManager.as
    On mouse down, change the test from "the click was in a bridged application", to "the click is in a bridged application and it has the same focus manager as the document". A bridged application that is in a dialog will have a different focus manager than the document.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17177
    Modified Paths:
    flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/SystemManager.as

    Thanks Jutapa.
    When I ran the DPC Latency Checker, there were no significant hiccups, and nothing abnormal at all when the skips occurred. The PCI Latency Tool had no effect on the issue, either (I tried many different latency options, between 0 and 248). But maybe they'll help other people with this or similar problems!
    Besides that, I tried logging huge amounts of data with the performance monitor and there's no consistent abnormalities at the times the skips occur as far as CPU usage or any other measurable variables go.
    I'll check out http://musicxp.net! I'd tried fresh installs and disabling all unnecessary system services and startup programs before and it also had absolutely no effect, but that's probably not what MusicXP.net advises, so I'll take a look. Thanks!

  • How do I set focus to a text field after I click a button that calls a webservice?

    I have a web service that returns back a table. In order to show the values in the table I had to check the re-merge Form Data on the Webservice Button.  My question is , How do I set focus to a field on the screen after re-merge happens.

    I was reading SetFocus documentation and it says
    You cannot use  setFocus with the form:ready, layout:ready, or initialize events.
    What I need is an event like doc:ready or someother event where I can put the set focus code in. doc:ready was triggered when the form first loads which is great and I was able to put my Initial setfocus. When I pressed the button that calls the webservice and thr re-merge happened doc:ready event was not triggered so now I am not sure where to put the set focus.

  • Download using open data set and close data set

    can any body please send some sample pgm using open data set and close data set .the data should get downloaded in application server
    very simple pgm needed

    Hi Arun,
    See the Sample code for BDC using OPEN DATASET.
    report ZSDBDCP_PRICING no standard page heading
    line-size 255.
    include zbdcrecx1.
    *--Internal Table To hold condition records data from flat file.
    Data: begin of it_pricing occurs 0,
    key(4),
    f1(4),
    f2(4),
    f3(2),
    f4(18),
    f5(16),
    end of it_pricing.
    *--Internal Table To hold condition records header .
    data : begin of it_header occurs 0,
    key(4),
    f1(4),
    f2(4),
    f3(2),
    end of it_header.
    *--Internal Table To hold condition records details .
    data : begin of it_details occurs 0,
    key(4),
    f4(18),
    f5(16),
    end of it_details.
    data : v_sno(2),
    v_rows type i,
    v_fname(40).
    start-of-selection.
    refresh : it_pricing,it_header,it_details.
    clear : it_pricing,it_header,it_details.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = 'C:\WINDOWS\Desktop\pricing.txt'
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = it_pricing
    EXCEPTIONS
    CONVERSION_ERROR = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    WRITE : / 'Condition Records ', P_FNAME, ' on ', SY-DATUM.
    OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.
    if sy-subrc ne 0.
    write : / 'File could not be uploaded.. Check file name.'.
    stop.
    endif.
    CLEAR : it_pricing[], it_pricing.
    DO.
    READ DATASET P_FNAME INTO V_STR.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF.
    write v_str.
    translate v_str using '#/'.
    SPLIT V_STR AT ',' INTO it_pricing-key
    it_pricing-F1 it_pricing-F2 it_pricing-F3
    it_pricing-F4 it_pricing-F5 .
    APPEND it_pricing.
    CLEAR it_pricing.
    ENDDO.
    IF it_pricing[] IS INITIAL.
    WRITE : / 'No data found to upload'.
    STOP.
    ENDIF.
    loop at it_pricing.
    At new key.
    read table it_pricing index sy-tabix.
    move-corresponding it_pricing to it_header.
    append it_header.
    clear it_header.
    endat.
    move-corresponding it_pricing to it_details.
    append it_details.
    clear it_details.
    endloop.
    perform open_group.
    v_rows = sy-srows - 8.
    loop at it_header.
    perform bdc_dynpro using 'SAPMV13A' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RV13A-KSCHL'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RV13A-KSCHL'
    it_header-f1.
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_CURSOR'
    'KONP-KBETR(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'KOMG-VKORG'
    it_header-f2.
    perform bdc_field using 'KOMG-VTWEG'
    it_header-f3.
    **Table Control
    v_sno = 0.
    loop at it_details where key eq it_header-key.
    v_sno = v_sno + 1.
    clear v_fname.
    CONCATENATE 'KOMG-MATNR(' V_SNO ')' INTO V_FNAME.
    perform bdc_field using v_fname
    it_details-f4.
    clear v_fname.
    CONCATENATE 'KONP-KBETR(' V_SNO ')' INTO V_FNAME.
    perform bdc_field using v_fname
    it_details-f5.
    if v_sno eq v_rows.
    v_sno = 0.
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_OKCODE'
    '=P+'.
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    endif.
    endloop.
    *--Save
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_OKCODE'
    '=SICH'.
    perform bdc_transaction using 'VK11'.
    endloop.
    perform close_group.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • What is open data set and close data set

    what is open data set and close data set,
    how to use the files in sap directories ?

    hi,
    Open Dataset is used to read or write on to application server ... other than that i am not sure that there exists any way to do the same ... here is a short description for that
    FILE HANDLING IN SAP
    Introduction
    • Files on application server are sequential files.
    • Files on presentation server / workstation are local files.
    • A sequential file is also called a dataset.
    Handling of Sequential file
    Three steps are involved in sequential file handling
    • OPEN
    • PROCESS
    • CLOSE
    Here processing of file can be READING a file or WRITING on to a file.
    OPEN FILE
    Before data can be processed, a file needs to be opened.
    After processing file is closed.
    Syntax:
    OPEN DATASET <file name> FOR {OUTPUT/INPUT/APPENDING}
    IN {TEXT/BINARY} MODE
    This statement returns SY_SUBRC as 0 for successful opening of file or 8, if unsuccessful.
    OUTPUT: Opens the file for writing. If the dataset already exists, this will place the cursor at the start of the dataset, the old contents get deleted at the end of the program or when the CLOSE DATASET is encountered.
    INPUT: Opens a file for READ and places the cursor at the beginning of the file.
    FOR APPENDING: Opens the file for writing and places the cursor at the end of file. If the file does not exist, it is generated.
    BINARY MODE: The READ or TRANSFER will be character wise. Each time ‘n’’ characters are READ or transferred. The next READ or TRANSFER will start from the next character position and not on the next line.
    IN TEXT MODE: The READ or TRANSFER will start at the beginning of a new line each time. If for READ, the destination is shorter than the source, it gets truncated. If destination is longer, then it is padded with spaces.
    Defaults: If nothing is mentioned, then defaults are FOR INPUT and in BINARY MODE.
    PROCESS FILE:
    Processing a file involves READing the file or Writing on to file TRANSFER.
    TRANSFER Statement
    Syntax:
    TRANSFER <field> TO <file name>.
    <Field> can also be a field string / work area / DDIC structure.
    Each transfer statement writes a statement to the dataset. In binary mode, it writes the length of the field to the dataset. In text mode, it writes one line to the dataset.
    If the file is not already open, TRANSFER tries to OPEN file FOR OUTPUT (IN BINARY MODE) or using the last OPEN DATASET statement for this file.
    IF FILE HANDLING, TRANSFER IS THE ONLY STATEMENT WHICH DOES NOT RETURN SY-SUBRC
    READ Statement
    Syntax:
    READ DATASET <file name> INTO <field>.
    <Field> can also be a field string / work area / DDIC structure.
    Each READ will get one record from the dataset. In binary mode it reads the length of the field and in text mode it reads each line.
    CLOSE FILE:
    The program will close all sequential files, which are open at the end of the program. However, it is a good programming practice to explicitly close all the datasets that were opened.
    Syntax:
    CLOSE DATASET <file name>.
    SY-SUBRC will be set to 0 or 8 depending on whether the CLOSE is successful or not.
    DELETE FILE:
    A dataset can be deleted.
    Syntax:
    DELETE DATASET <file name>.
    SY-SUBRC will be set to 0 or 8 depending on whether the DELETE is successful or not.
    Pseudo logic for processing the sequential files:
    For reading:
    Open dataset for input in a particular mode.
    Start DO loop.
    Read dataset into a field.
    If READ is not successful.
    Exit the loop.
    Endif.
    Do relevant processing for that record.
    End the do loop.
    Close the dataset.
    For writing:
    Open dataset for output / Appending in a particular mode.
    Populate the field that is to be transferred.
    TRANSFER the filed to a dataset.
    Close the dataset.
    Regards
    Anver
    if hlped pls mark points

  • Why can't I set a relative date for a recurring event in calendar on my ipod touch?

    why can't I set a relative date for a recurring event in calendar on my ipod touch?

    Because The Calendar app does not support it. There are apps in the App store that do.

  • Setting focus on a component from backing bean

    Is there an easy way to set focus in a specific component on the jspx from a method in the backing bean? (other than javaScript coding...)

    Hi,
    did you take a look at
    About control the cursor position in a JSF web page
    It contains some links to other weblogs. The links are helpfull. Maybe you'll be able to find your solution there......
    Good luck
    Luc Bors

Maybe you are looking for