Insert table row - moving Selection

Have a table row selected and new data is inserted and the table rows are moving down. When first row is NOT selected and new table row has fired inserted, the selection row programatically moves down.
However if the first row is selected, and new data is added to the first row, the first and second row are selected even tho its programatically should work, just like if the row selected was second, third etc...
What's up with the first table row selected and new data inserted into the first table row to cause selection unions, even tho programatically it shouldn't?
Thanks
Abraham Khalil

After the row being inserted, have you tried
table.setRowSelectionInterval(row1,row2)?
And in case it is the first row,
table.setRowSelectionInterval(0,0);
And you can even scroll to show the selection if you want by call
table.scrollRectToVisible(getCellRect(selectedRow, 0, true));
which will show the selectedRow
HTH
Bing
          

Similar Messages

  • Why is it so laborious to insert table rows?

    I have a table that is at least 1,000 rows in length. I've
    used the shortcut Alt+A+I+R to insert a single table row, and I've
    found that if I select existing rows, such as five or ten at a
    time, I can insert that same number of rows in one action. However,
    to insert five rows at a time, it takes about 3-5 minutes. To
    insert 10 table rows at a time, it takes about 5-10 minutes.
    Is there anyway I can eliminate the time lag to insert table
    rows? I tried to create one new table of 1,000 rows initially, but
    RoboHelp limits the table creation to 100 rows at a time.
    thanks in advance,
    ChristyG

    Hi ChristyG
    I think what you are seeing is something inherent with the
    RoboHelp HTML editor. 1,000 rows is a pret-ty large table IMHO. The
    RoboHelp HTML WYSIWYG editor just wasn't designed to handle things
    that size. I'm just guessing here, but You probably also notice
    that you can easily "type ahead" in this topic and it looks as if
    you are typing i n s l o w m o t i o n.
    So unfortunately, I'm going to have to say that no, there is
    simply no way to "speed it up". The only possibility that comes to
    mind is to use a different HTML editor for such topics. I have no
    idea if Dreamweaver or other editors are up to that sort of task.
    Perhaps someone with more experience with different editors can
    comment on that.
    Sincerely... Rick

  • Acrobat - Insert Table (Rows/Columns)

    I need to insert a table over a plan (architectural plan) so that we can indicate start and finish dates for work activities.  Is any one aware of a plug-in facility that will allow you to create a table (Rows/Columns) of varying quantity/size? Similar to draw table in MS Word.
    Thanks

    The only way I know to do this is to create the table in a word processor or such. You could do this for all of the tables you need. Create a new PDF of the tables. Then use the object touchup tool (or object select?) to copy the table from the table PDF to the drawing. You may have to look for where it is copied and move it to where needed. The paste seems to work differently in different versions of Acrobat.

  • How to get the index of table row without selection?

    Hi all,
    I have an table designed in XML view.Now i have added an change method for qty cell "valqty". When user inputs the qty in the cell and press enter this method is triggered now I want to know which index of the table is currently edited.Through which i can get the value of other cell in the same row.
    NOTE: The table row doesn't have selection either multiple or single
    I tried the following inside the valqty method but it now working
    this.getValue();
    this.getBindingContext().getProperty('PRD_NUM');
    <Table id="idProductsTable"
    inset="false"
    items="{oModel>/deliverylist}"
    visibleRowCount= "7"
    mode="MultiSelect"
    modeAnimationOn="true">
    <headerToolbar>
    <Toolbar>
    <Label text="Products"></Label>
    </Toolbar>
    </headerToolbar>
    <columns>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Order" />
    </Column>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Quantity" />
    </Column>
    </columns>
    <items>
    <ColumnListItem>
    <cells>
    <Text text="{oModel>PRD_NUM}" />
    <Input value="{oModel>DEL_QUAN}" change="valqty" maxLength="13"  />
    </cells>
    </ColumnListItem>
    </items>
    </Table>
    Thanks

    Thanks Robin,
    But in my case oEvent.getSource() is returning the cell instance and
    oEvent.getSource().getBindingContext() is undefined
    Hence not getting the value
    I also tried the following
    oEvent.getSource().getParent().getParent().indexOfItem()
    But index returned is -1

  • In SAPUI5, Passing Table Row Data  Selected in one xml view to another xml view and display in the second View

    Dear Friends,
    Please provide the solution for the following scenario:
    In the first view(xml)  I have a table with the fields QuotationNo,plant name, material no...etc, where I am displaying the data fetched using Odata model. The table is enable with Single line selection mode. My requirement is to Carry the selected row data to another view(xml) and display there.
    Please give your valuable inputs.

    Hi Rinku,
    depending on how you do the navigation, you might find the information here: OpenUI5 SDK - Demo Kit helpful.
    Regards Frank

  • ADF Popup issue with table row not selected

    OK, imagine this scenario. There is a page displaying a table of employees, and when you click on the employee_id (which is shown as URL), which is one of the columns of the table, a popup displays, showing the details of that particular employee.
    Now in the properties of the employee table, we unchecked the row selection property. Now how will I be able to achieve the same thing?
    I dragged the setCurrentRowWithKeyValue operation on employee_id column, changed the bindings of the TEXT property, added a popup behaviour, but still the popup displays the first row which is fetched in the table.
    Where am I missing, or is there any other way to achieve the same thing?
    JDev version: 11.1.2.2.0
    Edited by: Sonal on Oct 11, 2012 3:11 AM

    I did an exercise where I created one page which was displaying all the employees, and once you click on employee_id (which is shown as URL), a 2nd page opens displaying the details of the employees.
    Now in the above exercise, ROW SELECTION was disabled, for which I had to use this setCurrentRowWithKeyValue operation and then set the NDValue with the binding of the employee ID. So whenever I used to click on the employee_id, the page was taking to me the form, which was displaying exactly the same employee details.
    Now this thing should work with the popup thing too, right? So I disabled the ROW SELECTION

  • How to populate table rows with selected listbox items?

    Hello,
    I am trying to populate a table with selected listbox items. Each item should be a new row in the table. The picture below is the listbox and table I am using. I need to get the selected name to populate the Attendee column of the table when the user clicks the Add button. How do you do this with mutltiple attendees selected?
    Thank you,
    Angie

    So you're considering the fact the if the user clicks the button twice, the name will appear twice and you don't want this, right?
    Then you must check if any value is the same than the one you are about to add in the row..
    for (var i = 0 ; i < ListBox1.length; i++){
         if (ListBox1.getItemState(i) == true){
              for (var x = 0 ; x < Table1._Row1.count; x++){
                   var boNewAttendee = true;
                   var strAttendee = Table1.resolveNode("Row1[" + x.toString() + "]").txtAttendee;
                   var newAttendee = ListBox1.getDisplayItem(i);
                   if (strAttendee.rawValue == newAttendee){
                        boNewAttendee = false;
                        break;
              if (boNewAttendee){
                   txtAttendee.rawValue = ListBox1.getDisplayItem(i);

  • ALV Table row not selected, on_lead_select not fired

    Hi all,
    I build a ALV grid with a dynamic node:
    IF lv_check_child_node NE 'X'.
         CALL METHOD lo_nd_root->add_new_child_node
            EXPORTING
    *          supply_method                =
    *          supply_object                =
    *          dispose_method               =
    *          dispose_object               =
    *          static_element_type          =
              name                         = 'ALV_RESULT'
              is_mandatory                 = abap_true
              is_mandatory_selection       = abap_false
              is_multiple                  = abap_true
              is_multiple_selection        = abap_false
              is_singleton                 = abap_true
              is_initialize_lead_selection = abap_false
              static_element_rtti          = lr_strucdescr
              is_static                    = abap_true
    *          attributes                   =
            RECEIVING
              child_node_info              = lo_nd_alv_result.
        ENDIF.
        lo_nd_result = wd_context->get_child_node( name = lv_tab_name ).
        lo_nd_result->bind_table( new_items = <lt_alv_tab> ).
    * Instantiate ALV component
        l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
        IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
          l_ref_cmp_usage->create_component( ).
        ENDIF.
        lo_nd_result = wd_context->get_child_node( name = lv_tab_name ).
        l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
        l_ref_interfacecontroller->set_data(
          r_node_data = lo_nd_result ).
        l_ref_interfacecontroller->get_model( RECEIVING value = lr_cmdl ).
        lr_cmdl->if_salv_wd_std_functions~set_export_allowed( abap_false ).
        lr_cmdl->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
        lr_cmdl->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
    *  lr_cmdl->if_salv_wd_table_settings~set_design( cl_wd_table=>e_design-alternating ).
        lr_cmdl->if_salv_wd_table_settings~set_selection_mode( cl_wd_table=>e_selection_mode-single ).
        lr_cmdl->if_salv_wd_table_settings~set_cell_action_event_enabled( value = abap_true ).
        lr_cmdl->if_salv_wd_table_settings~set_data_check( if_salv_wd_c_table_settings=>data_check_on_cell_event ).
    *    lr_cmdl->if_salv_wd_table_settings~set_read_only( value = abap_false ).
    *    lr_cmdl->if_salv_wd_table_settings~set_enabled( value = abap_true ).
        lr_cmdl->if_salv_wd_table_settings~set_row_selectable( value = abap_true ).
        IF lt_fieldcat IS NOT INITIAL.
          lt_col = lr_cmdl->if_salv_wd_column_settings~get_columns( ).
          LOOP AT lt_fieldcat INTO ls_fieldcat.
            READ TABLE lt_col INTO ls_col WITH KEY id = ls_fieldcat-fieldname.
            IF sy-subrc = 0.
              ls_col-r_column->set_position( ls_fieldcat-col_pos ).
              CALL METHOD ls_col-r_column->get_header
                RECEIVING
                  value = lr_header.
              lr_header->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_none ).
              lv_headertx = ls_fieldcat-seltext_l.
              lr_header->set_text( lv_headertx ).
            ELSE.
              ls_col-r_column->set_visible( cl_wd_uielement=>e_visible-none ).
            ENDIF.
          ENDLOOP.
        ENDIF.
    But when I execute the dynpro, I get all the data I want. But I cannot select any row and the ON_LEAD_SELECT is not executed (an eventhandler is made in the method tab, and the event is bind to this handler).
    When I change from selection_mode single to single_no_lead, I can select the row but the event is still not executed (not strange).
    Is there anybody who can help me. We have support package SAPKB70020.
    Regards,
    Michael

    Have you set the Initialization Lead Selection of the node as abap_true?
    Also Check the below thread:
    Unable to selelct a Row in ABAP Webdynpro ALV table

  • Inserting Table Rows in Acrobat 9

    I have a table that was created in MS Word, then converted to a PDF.  Is there a way to add rows to the table dynamically, depending on how much info the user has to fill out?

    You can create dynamic forms with LiveCycle Designer.

  • Inserting multiple rows into a table using a multiple-select list

    I'm trying to figure out how to take the output of a multiple-select list (":" separated list of values) and use that to update a table by inserting multiple rows based on the values. Is there a straight-forward way to do that in APEX?
    Thanks.
    Chris

    Hi Chris,
    I think this should give you what you need: Working with a Multiple Select List Item
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can not insert a row to a table from Oracle DBA Studio

    Hi,
    I try to use the Oracle DBA Studio to create a table and put some test data in it. Here is what I found:
    I start Oracle DBA Studio on the client machine by connecting to an Oracle server 8i (8.1.7). I create a simple table called Test with two columns: one is USER, VARCHAR2, 10; and the other is USER2, CHAR, 2. After that, I right click on the table name and select "Table Data Editor" from the popup menu. The table editor window shows up. I type in the value 'AA' and 'BB' in the grid of two columns. Then I click the Apply button. An error message box popped up:
    ORA-00928 missing SELECT keyword.
    I click Show SQL button. The SQL statement is as following:
    INSERT INTO "TASYS"."TEST" (USER ,USER2 ) VALUES ('AA' ,'BB').
    I copy the statement to SQL Plus and run it. The same error is generated. But if I remove (USER, USER2) from the statement, it inserts a row without complaint. In other word, the database will not allow to insert if individual columns are list. I realize something must wrong with the new server and client installed and could not figure out what happening. Hope someone can help.
    Thanks.
    null

    I am not sure, but could it be that USER is a keyword or predefine word. Check Oracle'slist of predefine/keyword

  • Insert multiple rows in a table

    Hello Apex expert,
    I need help on insert multiple rows. it may look easy but I don't know how to do it.
    I have a table (with name found_table) which has these fields: found_ item_id, item_name, current_location, cost_center, tag_number. Also, I have a table (with the name transition) which has these fields: transition_id, found_item_id (FK to found_table), from_location, to_location, From_cost_center, to_cost_center, tag_number.
    I have an interactive report on found_table which I would like to add checkbox to all rows of the report. When the user checks any rows and press submit, I would like to send all these selected rows to another page which I have a form on transition table. The user will select a to_location and to_cost_center from this page (by the way from_location and from_cost_center and tag_number is the same as current_location and cost_center, tag_nuber from found_table, which I figured it out how to show those as a default in the new form). Now I want when a user selects the new location and cost center and press submit, all those selected rows be inserted in transition table with new locations.
    I read several threads on forum, but I could not find a solution for my problem. I will appreciate your help.
    Thanks,
    Atousa

    Hello again,
    I created a report with check box. I also added two selected list at the top of the region to select the location and cost center. Also, there is a transfer button(as submit) to insert the new data to table. Now I need the insert process. I tried different insert process but none of them is working for me:(((
    I created an example of what I need to do in the apex that you can take a look and give me some advise. The link is:
    What I need to do is:
    When a user selects several rows by using checkbox and selects To_LOCATION, and TO_COST_CENTER from selected list, and clicks on transfer, all the data should be insert in to another table with the name transition as follows:
    from found table to transition table
    found_item_id(pk) found_item_id (fk)
    current_location from_location
    cost_center from_cost_center
    tag_number tag_number
    selected list (to_location) to_location
    selected list (to_cost_center) to_cost_center
    Please help me on that. I appreciated.
    Atousa
    Edited by: Atousa.M on Jul 21, 2011 10:55 AM

  • Error inserting a row into a table with identity column using cfgrid on change

    I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
    also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
    update table (xxx,xxx,xxx)
    values (uu,uuu,uu)
         My component
    <!--- Edit a Media Type  --->
        <cffunction name="cfn_MediaType_Update" access="remote">
            <cfargument name="gridaction" type="string" required="yes">
            <cfargument name="gridrow" type="struct" required="yes">
            <cfargument name="gridchanged" type="struct" required="yes">
            <!--- Local variables --->
            <cfset var colname="">
            <cfset var value="">
            <!--- Process gridaction --->
            <cfswitch expression="#ARGUMENTS.gridaction#">
                <!--- Process updates --->
                <cfcase value="U">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                    <cfquery datasource="#application.dsn#">
                    UPDATE SP.MediaType
                    SET #colname# = '#value#'
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <!--- Process deletes --->
                <cfcase value="D">
                    <!--- Perform actual delete --->
                    <cfquery datasource="#application.dsn#">
                    update SP.MediaType
                    set Deleted=1
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <cfcase value="I">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                   <cfquery datasource="#application.dsn#">
                    insert into  SP.MediaType (#colname#)
                    Values ('#value#')              
                    </cfquery>
                </cfcase>
            </cfswitch>
        </cffunction>
    my table
    mediatype:
    mediatypeid primary key,identity
    mediatypename
    my code is
    <cfform method="post" name="GridExampleForm">
            <cfgrid format="html" name="grid_Tables2" pagesize="3"  selectmode="edit" width="800px" 
            delete="yes"
            insert="yes"
                  bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
                                                                ({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
                  onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
                                                {cfgridrow},
                                                {cfgridchanged})">
                <cfgridcolumn name="MediaTypeID" header="ID"  display="no"/>
                <cfgridcolumn name="MediaTypeName" header="Media Type" />
            </cfgrid>
    </cfform>
    on insert I get the following error message ajax logging error message
    http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
    {"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
    Thanks

    Is this with the Travel database or another database?
    If it's another database then make sure your columns
    allow nulls. To check this in the Server Navigator, expand
    your DataSource down to the column.
    Select the column and view the Is Nullable property
    in the Property Sheet
    If still no luck, check out a tutorial, like Performing Inserts, ...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    John

  • Inserting Multiple Rows in a table

    Hello,
    I need to insert multiple rows in a table with the selected items from a list (Multiple select).
    How do i go about it. I'm using ADF-struts-UIX application on Jdeveloper 9.0.5.2
    Thanks.

    Jonas, I've downloaded the sample application from your ADF UIX Editable table tip but have some problems.
    I can't even open the emp.table.uix file - errors are:
    Parsing error. Unable to parse binding.
    javax.servlet.jst.el.ELException:Function ctrl:createSortableHeaderModel was not found.
    and
    javax.servlet.jst.el.ELException:Function ctrl:getSortOrder was not found.
    Also - is there a place in the sample where you define the sample tables? They do not seem to match the standard sample emp table, for instance.
    I've just started using JDeveloper and would like to use the solution.
    Thanks - Linda

  • Insert query for insert all data into table in vb6 but it insert 1 row in table

    This is My insert query in vb6 but it insert 1 row in table
    But i want insert all data in the table which contain the id =1.
    Note that billtabsuport is blank
    i want solution for this
    strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption
    Set DBrecordset = DBConnection.Execute(strSQL)
    strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"
    DBConnection.Execute (strSQL)

    The syntax for inserting from one set of tables to a new table is:
    insert into newtable
    (field1, field2, etc)
    select somefield1, somefield2, etc
    from some other tables
    where whatever

Maybe you are looking for