Selected rows in tableview

Hello,
Using a tableview with table iterator, the user can select one or more lines and delete them by using a button.
A server event is triggered then to delete the data on the database. But afterwards the tableview appears with the same row indexes selected. But I don't
want to have any selected rows afterwards and I don't know
in fact where this indexes are from, where they are kept.
The selected rows come from table->data
->PREVSELECTEDROWINDEXTABLE to delete the selected rows.
The deletion of this indextable afterwards does not help to get rid of the selected rows after the server event.
<htmlb:tableView id                    = "<%= l_ref_wa-QSDS_I_R3QSC_FIELDS-fields %>"
                     table                 = "//g_page1model_view/QSDS_I_QS_INPUT_NR2"
                     headerVisible         = "FALSE"
                     footerVisible         = "FALSE"
                     design                = "alternating"
                     selectionMode         = "MULTISELECT"
                     iterator              = "<%= g_page1model_view->tv_iterator %>"
                     focus1stSelectedCell  = "FALSE"
                     tabIndexCell          = "FALSE"
                     tableLayout           = "FIXED"
                     keepSelectedRow       = "FALSE"
                     headerText            = "<%= l_ref_wa-header %>"
                     allRowsEditable       = "X" />
Anyone could help me.
kind regards.
Carola

Hi Carola,
some months ago a cool dude in this forum posted this code =)
    cl_htmlb_manager=>check_tableview_all_rows(
    rowcount = table_event->ROWCOUNT
    request = request
    id = '<YOUR TABLEID>'
    keytable = table_event->PREVSELECTEDROWKEYTABLE
    check = '' ).
I am using it to deselect my tables and it works without any problems, have fun.
regards
Thomas

Similar Messages

  • Get value of a selected row in a TableView

    Hi all.
    I'm very new to BSP-Extensions and don't know how to get the values of a selected row in a tableview. I've written a simple bsp with a tableview and a button (both htmlb). I want to get the selected values (as a workarea of tab or cell values) of the tableview at the moment where a user hits the button. I have thought that i could use the method GET_CELL_VALUE but it never works.
    Here are my type definitions:
    TYPES t_scarr TYPE TABLE OF scarr.
    Here are my page attributes:
    DATA pa_str_scarr TYPE scarr.
    DATA pa_tab_scarr TYPE t_scarr
    Here is the layout coding:
    <htmlb:content design           = "design2003"
                   controlRendering = "SAP" >
      <htmlb:document>
        <htmlb:documentHead>
        </htmlb:documentHead>
        <htmlb:documentBody>
          <htmlb:form>
            <htmlb:tableView id             = "tableview_scarr"
                             table          = "<%= pa_tab_scarr %>"
                             headerText     = "Table SCARR"
                             headerVisible  = "TRUE"
                             width          = "100%"
                             selectionMode  = "SINGLESELECT"
                             onRowSelection = "select" >
            </htmlb:tableView>
            <htmlb:button id      = "button_go"
                          text    = "Go"
                          onClick = "button_go" />
          </htmlb:form>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    Here is the coding of OnInitialization:
    SELECT * FROM scarr INTO TABLE pa_tab_scarr.
    And this is my OnInputProcessing:
    DATA: event TYPE REF TO cl_htmlb_event,
          tv TYPE REF TO cl_htmlb_tableview,
          table_event TYPE REF TO cl_htmlb_event_tableview,
          selected_row_index TYPE selectedrow-index,
          cell_value TYPE string.
    IF event_id = 'htmlb'.
      event = cl_htmlb_manager=>get_event( runtime->server->request ).
      CASE event->server_event.
        WHEN 'button_go'.
          tv ?= cl_htmlb_manager=>get_data( request = request
                                            name    = 'tableView'
                                            id      = 'tableview_scarr' ).
          IF tv IS NOT INITIAL.
            table_event = tv->data.
            selected_row_index = table_event->selectedrowindex.
            cell_value = table_event->get_cell_value(
                row_index    = selected_row_index
                column_index = 1 ).
          ENDIF.
      ENDCASE.
    ENDIF.
    What is wrong and what is the best way to get the selected data at this moment?

    In your code....
    change
         <htmlb:button id      = "button_go"
                          text    = "Go"
                          onClick = "button_go" />
    to
         <htmlb:button id      = "button_go"
                          text    = "Go"
                          onClick = "onInputProcessing" />
    Also you are not getting the <b>selectedRowIndextable</b>.That might also be the problem...
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Error in receiving tableview data for selected row

    Hi Collegues ,
    We plan to realize an application for the maintanance of  planning data . In the first step we created a value help page by using a tableview with iterator class ( 1 of the 3 methods of the Interface was filled with logic ) . We don't use any controller for that application  .
    A global internal table with the relevant help value data ( fgrvalues ) is used for the tableview and the call is :
    TYPE I .
    +CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    CLEAR ONCLICKEVENT.
    IF EVENT_ID = CL_HTMLB_MANAGER=>EVENT_ID.
        EVENT_DATA = CL_HTMLB_MANAGER=>GET_EVENT( REQUEST ).
        IF ( EVENT_DATA IS NOT INITIAL ) AND
                ( EVENT_DATA->EVENT_TYPE = 'click' ) .
                ONCLICKEVENT = EVENT_DATA->SERVER_EVENT .
        ENDIF.
    ENDIF.+
    CASE ONCLICKEVENT.
    WHEN 'take' .
       TABLE ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
       NAME = 'tableView'
       ID = 'fgr1_vhelp' ) .
       TABLE_EVENT = TABLE->DATA.
       IF TABLE_EVENT->SELECTEDROWINDEX IS NOT INITIAL.
          ROWSELECTION = TABLE_EVENT->SELECTEDROWINDEX.  
    -> ROWSELECTION - Content is now the index of the selected tableview row
    We always get the selected row in TABLE_EVENT->SELECTEDROWINDEX and the table TABLE_EVENT->ALLCOLUMNNAMES filled ( column ZX_FGR1 is the 2nd column ) 
    but we never got the tableview data for that tableview row no matter what we tried . We tried it with a tableview-event fired on 'rowselection' by user line-selection . We have deactivated the iterator or changed the BPS design value . With the same result - nothing was given back .
    We found that the System-Call Return value of :
    +system-call ict
    did
    ihttp_scid_get_form_field
    parameters
    m_c_msg " > c handle
    name " > form field name                value " < form field value
                    m_last_error. " < return code+
    in the method IF_HTTP_ENTITY~GET_FORM_FIELD is empty .  M_LAST_ERROR occurs with value '20' .
      + ASSIGN ROWSELECTION TO .
    COLUMN_VALUE = TABLE_EVENT->GET_CELL_VALUE( ROW_INDEX =
    COLUMN_INDEX = '2' ). -> Column Value is empty !!+
       +CALL METHOD TABLE_EVENT->GET_CELL_VALUE
          EXPORTING
            ROW_INDEX = TABLE_EVENT->SELECTEDROWINDEX
            COLUMN_INDEX = '2'
          RECEIVING
            VALUE = COLUMN_VALUE -> Column Value is empty !!+
       +CALL METHOD TABLE_EVENT->GET_SIMPLE_DATA ....
             -> Column Value is empty !!+ *----
    What could be the reason for that problem ? In generally it must be possible somehow to read the tableview data for one or all rows of the mentioned tableview .
    We hope that someone can help and are very thankful for a hint or solution . If you need more details please let us know .
    Please Remark: It's no solution for us to read the data by using the created internal table fgrvalues and the selectedrowindex cause in a later step we plan to update an ODS table with the manual modified planning data of an editable tableview .
    Thanks a lot in advance
    Dirk Läufer

    Hi collegues ,
    It's done .
    After we've got a very helpful little hint from Brian :
    The <htmlb:tableView> renders a table to the browser. It does not keep a copy of the table. The browser will also never return the table. Never. What it can return are inputfields for each cell. But then only if each cell is custom rendered as an inputfield.
    we could certainly solve the problem .
    We set the field we want to get back from table view on not editable inputfield via the tableview-iterator method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START :
    DATA: LCL_TABLE       TYPE REF TO CL_BSP_BEE_TABLE   ,
          LCL_INPUTFIELD2 TYPE REF TO CL_HTMLB_INPUTFIELD .
    CASE P_COLUMN_KEY .
    WHEN 'ZX_FGR1'.
    *    Field Firm Group
         CREATE OBJECT LCL_INPUTFIELD2.
         LCL_INPUTFIELD2->ID        = P_CELL_ID.
         LCL_INPUTFIELD2->WIDTH     = '100%'.
         LCL_INPUTFIELD2->MAXLENGTH = 4.
         LCL_INPUTFIELD2->TYPE      = 'STRING'.
         LCL_INPUTFIELD2->DESIGN    = 'STANDARD'.
         LCL_INPUTFIELD2->DISABLED  = 'TRUE'.
         LCL_INPUTFIELD2->VALUE =
             GET_COLUMN_VALUE( COLUMN_NAME = 'ZX_FGR1').
         P_REPLACEMENT_BEE     = LCL_INPUTFIELD2 .
    Now the method in OnInputPorcessing:
    TRY.
          CALL METHOD CL_HTMLB_MANAGER=>GET_SIMPLE_DATA
              EXPORTING
                REQUEST       = RUNTIME->SERVER->REQUEST
                ID            = 'fgr1_vhelp'
                ROW_IDX       = TABLE_EVENT->SELECTEDROWINDEX
                COL_NAME      = 'ZX_FGR1'
              CHANGING
                DATA          = FGRVALUES_LINE-ZX_FGR1 .
             IF NOT FGRVALUES_LINE-ZX_FGR1  IS INITIAL.
    *                 selektierte Firmengruppe übernehmen
                      ZX_FGR1     = FGRVALUES_LINE-ZX_FGR1   .
                      CALL METHOD NAVIGATION->SET_PARAMETER
                            EXPORTING NAME  = 'ZX_FGR1'
                                      VALUE = ZX_FGR1.
             ENDIF.
          CATCH CX_SY_CONVERSION_ERROR .
       ENDTRY.
    works properly as it should be ...
    An enormous Thanksgiving to you , Brian !!!!

  • Htmlb:tableView Recover the selected row

    Hi.
    How can I recover the selected row in a internal table, with the htmlb:tableView, in the onInputProcessing?
    Thanks very much!
    I'm using this sentence in the "layout":
    <!-- Visualizamos Línea de selección + tabla interna -->
        <htmlb:tableView id             = "myTableView"
                         visibleRowCount = "<%= c_ver_registros %>"
                         width                 = "<%= c_ancho_tabla %>"
                         selectionMode    = "SINGLESELECT"
                         table                  = "<%= T_TABLA %>" >
        </htmlb:tableView>
    null

    hi Marcos,
        While calling the Tableview in the layout get the selected row index in the attribute <b>selectedRowIndex = "<%= var_selectedindex %>"</b>   { where var_selectedindex should be defined as a pageattribute} the tableview definition should be like this..
    <htmlb:tableView id = "myTableView"
    visibleRowCount = "<%= c_ver_registros %>"
    width = "<%= c_ancho_tabla %>"
    selectionMode = "SINGLESELECT"
    <b>selectedRowIndex = "<%= var_selectedindex %>"</b>
    table = "<%= T_TABLA %>" >
    </htmlb:tableView>
    And in the <b>inputprocessing</b> ,
    Try this code..
    IF htmlb_event IS NOT INITIAL AND htmlb_event->if_htmlb_data~event_name = 'tableView' AND
         ( htmlb_event->if_htmlb_data~event_type = 'cellClick'   OR
           htmlb_event->if_htmlb_data~event_type = 'rowSelection' OR
           htmlb_event->if_htmlb_data~event_type = 'navigate' ) .
        DATA  tableview_event TYPE REF TO cl_htmlb_event_tableview.
        tableview_event ?= htmlb_event.
          IF lr_tableview_event->selectedrowindex IS NOT INITIAL .
               var_selectedindex  =  tableview_event->selectedrowindex.
        ENDIF.
      ENDIF.
    regards,
    Bhanu.

  • Multiple rows selection handling in Tableview

    Hi guys,
    ..Good morning ..
    I have developed one page for displaying Employees(pernr and Ename) under CEO/VP/Managers using <b>TableView</b>.
    Here i have some difficulties.
    <b>1.</b> I managed to show Multiple row selection menu
       (Selectall/deselectall) right upper corner of
       Tableview. but i can also select multiple rows not all
       at a time .So in this case ,those selected employees
       Overtime amount i want to show in the next page.here
       my question is How do i capture selected rows(not all
       at a time).
       I am using this code ..
    <htmlb:tableView id     = "tvX"
             headerText     = "Employee List"
              headerVisible = "true"
              idth          = "30%"
        selectedRowKeyTable = "<%= selectedRowKeyTable %>"
        onRowSelection      = "MyEventRowSelection"
        sort                = "server"
        keepSelectedRow     = "TRUE"
        selectionMode       = "MULTISELECT"
        table               = "<%= i_emp_1 %>" >
    <htmlb:tableViewColumns>
    <htmlb:tableViewColumn columnName          = "pernr"
                           width               = "10"
                           sort                = "server"
                           horizontalAlignment = "center"
                           title               = "Emp No"
                           type                = "TEXT" >
    </htmlb:tableViewColumn>
    <htmlb:tableViewColumn columnName          = "ename"
                           width               = "40"
                           sort                = "server"
                           horizontalAlignment = "center"
                           title               = "Emp Name"
                           type                = "TEXT" >
    </htmlb:tableViewColumn>
    </htmlb:tableViewColumns>
    </htmlb:tableView>
    <b>2</b>. How to send one Itab data from one page to
       another page.Presently i am using EXPORT/IMPORT
       statements.Is this right way or any other method is
       there for?. 
    Could you please look in to this ..
    <b>Best regards,
    Venkat.O</b>

    Hi Venkataiah,
    See page <b>TableViewMultiSelect.bsp</b> in BSP application SBSPEXT_TABLE.
    There is an attribute <b>selectedRowIndexTable</b> in tableView element. you have to assign a table of type INT4_TABLE, and you can fill this table by table_event->PREVSELECTEDROWINDEXTABLE in OnInputProcessing event. For more details see the above mentioned bsp application.
    To Export/Import is ok,  you can use server-side cookies also, But best way is using model binding. Learn MVC for that.
    Hope it solves your problem.
    Regards,
    Narnder Hartala

  • Clear TableView Selected rows - Urgent

    Hi All,
    I have a stateful BSP application. I have a tableview in that applications. I have the multiselect option in that table. Is there any way to clear the previous selected rows of the table. The table is getting new data without any problems but the previously selected line remain on the table Would appreciate if anyone could help me out as it is Urgent !!
    Best Regards,
    Sudhi

    Hi Sudhi,
    You can follow up using this sample code. Here you can set a flag variable which is updated in onInputProcessing event.
    Layout:
    <htmlb:form>
         <%
            if flag is initial.
          %>
          <htmlb:tableView id              = "tab1"
                           table           = "<%= itab %>"
                           visibleRowCount = "8"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           selectionMode   = "multiSelect"
                           keepSelectedRow = "true" >
          </htmlb:tableView>
          <%
            endif.
          %>
          <%
            if flag eq 1.
          %>
          <htmlb:tableView id              = "tab2"
                           table           = "<%= itab %>"
                           visibleRowCount = "8"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           selectionMode   = "multiSelect"
                           keepSelectedRow = "true" >
          </htmlb:tableView>
          <%
            clear flag.
          %>
          <%
            endif.
          %>
          <htmlb:button id      = "but01"
                        text    = "Click"
                        onClick = "myEvent" />
        </htmlb:form>
    OnInputProcessing:
    DATA: tv TYPE REF TO cl_htmlb_tableview.
    DATA: event TYPE REF TO cl_htmlb_event.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    IF event->id = 'but01' AND event->event_type = 'click'.
      tv ?= cl_htmlb_manager=>get_data(
                      request      = runtime->server->request
                      name         = 'tableView'
                      id           = 'tab1' ).
      IF tv IS NOT INITIAL.
        DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
        tv_data = tv->data.
        DATA : itab2 TYPE TABLE OF selectedrow,
             ind TYPE selectedrow,
             row_s TYPE zdi_so.
        CALL METHOD tv_data->get_rows_selected
          RECEIVING
            selected_rows = itab2.
      ENDIF.
      IF itab2 IS NOT INITIAL.
        DATA :rw LIKE LINE OF itab.
        LOOP AT itab2 INTO ind.
               flag = '1'.
          DELETE itab INDEX ind-index.
        ENDLOOP.
      ENDIF.
    ENDIF.
    Hope this helps,
    Regards,
    Ravikiran.
    Message was edited by: Ravikiran C

  • RichTable moves Selected Row to the Top of my tableview on refresh

    When I issue a partialtrigger on a table with a selected Row, the selected row is repositioned to be the first Row that is available. The actual positions of the rows in the tables dont change, the selected row is just scrolled to the top... I need to suppress this behavior. Anyone have any Ideas?

    Without an exact jdve version we can't do much.
    Check these properties of hte table
    activeRowKey, displayRowKey and displayRow. Then read the doc for the properties and set them according your use case.
    Timo

  • How to delete selected row in table control

    Hi all,
    here is my coding for deleting selected row.
    But it is not working correctly.
    I am not able to delete seleced row.
    If i press delete button it automatically delete from beginning instead of selected rows.
    Can anyone can help me plz...
    CONTROLS rowdeleting TYPE TABLEVIEW USING SCREEN 100.
    TABLES zdetails.
    data : begin of itab occurs 0,
    NAME TYPE ZDETAILS-NAME,
    ADDRES TYPE ZDETAILS-ADDRES,
    CONTACTNO TYPE ZDETAILS-CONTACTNO,
    INIT TYPE C,
    end of itab .
    DATA OK_CODE LIKE SY-UCOMM.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'BACK'.
    IF ITAB-INIT IS INITIAL.
    SELECT NAME ADDRES CONTACTNO FROM ZDETAILS
    INTO CORRESPONDING FIELDS OF TABLE ITAB.
    DESCRIBE TABLE ITAB LINES rowdeleting-LINES.
    ITAB-INIT = 'X'.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    MODULE CHANGE_SDYN_CONN OUTPUT.
    READ TABLE itab INTO ZDETAILS INDEX rowdeleting-current_line.
    ENDMODULE. " CHANGE_SDYN_CONN OUTPUT
    MODULE READ_TABLE_CONTROL INPUT.
    IF ITAB-INIT = 'X' AND OK_CODE = 'DELETE'.
    DELETE ITAB index rowdeleting-current_line ."FROM ZDETAILS.
    DESCRIBE TABLE ITAB LINES rowdeleting-LINES.
    ENDIF.
    ENDMODULE. " READ_TABLE_CONTROL INPUT
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'BACK'.
    LEAVE PROGRAM.
    WHEN 'DELETE'.
    IF ITAB-INIT = 'X' AND OK_code = 'DELETE'.
    DELETE ITAB index rowdeleting-current_line .
    ENDIF.
    ENDCASE.
    ENDMODULE.
    regards ,
    ranjith.

    Hi,
    Check the following code:
    CONTROLS TABLE_CONTROL TYPE TABLEVIEW USING SCREEN 100.
    TABLES SDYN_SDW4.
    DATA SDYN_ITAB LIKE STANDARD TABLE OF SDYN_SDW4.
    DATA INIT.
    DATA OK_CODE LIKE SY-UCOMM.
    DATA SAVE_OK LIKE SY-UCOMM.
    DATA MARK.
    DATA  COL TYPE CXTAB_COLUMN.
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'GRUND'.
      SET TITLEBAR '100'.
      IF INIT IS INITIAL.
    Datenbeschaffung
       SELECT CARRID CONNID CITYFROM AIRPFROM CITYTO AIRPTO DEPTIME ARRTIME
                DISTANCE DISTID
                FROM SPFLI
                INTO CORRESPONDING FIELDS OF TABLE SDYN_ITAB.
        DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.
        INIT = 'X'.
      ENDIF.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  FILL_TABLE_CONTROL  OUTPUT
          text
    MODULE CHANGE_SDYN_CONN OUTPUT.
    you can change the content of current table control line via
    sdyn_conn
    READ TABLE sdyn_itab INTO sdyn_conn INDEX table_control-current_line.
    ENDMODULE.                             " FILL_TABLE_CONTROL  OUTPUT
    *&      Module  READ_TABLE_CONTROL  INPUT
          text
    MODULE READ_TABLE_CONTROL INPUT.
    Check input values
      IF MARK = 'X' AND SAVE_OK = 'DELETE'.
        DELETE TABLE SDYN_ITAB FROM sdyn_sdw4.
        DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.
      ENDIF.
    ENDMODULE.                             " READ_TABLE_CONTROL  INPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'SORT'.
          DATA: FLDNAME(100),HELP(100).
          READ TABLE TABLE_CONTROL-COLS INTO COL WITH KEY SELECTED = 'X'.
          SPLIT COL-SCREEN-NAME AT '-' INTO HELP FLDNAME.
          SORT SDYN_ITAB BY (FLDNAME).
      ENDCASE.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Module  EXIT  INPUT
          text
    MODULE EXIT INPUT.
    LEAVE PROGRAM.
    ENDMODULE.                 " EXIT  INPUT
    Regards,
    Bhaskar

  • How to save the selected row number to NSUserDefaults

    I am trying to save the indexpath.row of the selected row to NSUserDefaults temporarily until my detail view controller can load its UITextFields based on which row is tapped. First of all is this good? I chose this design because the detail view controller cannot access the master view controller so I can't find out which row its tapped. To save to NSUSerDefaults, I did the following code, and the NSLog is always returning row 0 no matter what row I tap. Plus the title is not being set: its still blank.
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
        [patientList deselectRowAtIndexPath:indexPath animated:YES];
        [[NSUserDefaults standardUserDefaults] setInteger:indexPath.row forKey:@"rowSelected"];
        NSLog(@"The selected row saved is row %d"), [[NSUserDefaults standardUserDefaults] integerForKey:@"rowSelected"];
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
            PatientDetailViewController *detailViewController = [[PatientDetailViewController alloc] initWithNibName:@"PatientDetailViewController" bundle:nil];
            detailViewController.title = [patientDisplayName objectAtIndex:[[NSUserDefaults standardUserDefaults] integerForKey:@"rowSelected"]];
            // Pass the selected object to the new view controller.
            [self.navigationController pushViewController:detailViewController animated:YES];
            [detailViewController release];

    I have also tried setting the title differently (I also added comments to explain each line what it does, the rest is the same), but neither methods work
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
        // Deselect the row
        [patientList deselectRowAtIndexPath:indexPath animated:YES];
        // Save to memory the row selected
        [[NSUserDefaults standardUserDefaults] setInteger:indexPath.row forKey:@"rowSelected"];
        // Show saved row to make sure it saved correctly
        NSLog(@"The selected row saved is row %d"), [[NSUserDefaults standardUserDefaults] integerForKey:@"rowSelected"];
        // Check if user is using iPhone
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
            // Load the view
            PatientDetailViewController *detailViewController = [[PatientDetailViewController alloc] initWithNibName:@"PatientDetailViewController" bundle:nil];
            // Set the title of the detail view controller based on row selected
            detailViewController.title = [patientDisplayName objectAtIndex:indexPath.row];
            // Push the detail view controller
            [self.navigationController pushViewController:detailViewController animated:YES];
            // Release the detail view controller
            [detailViewController release];

  • Adding new rows in tableview of BSP

    Hi all,
       I am facing the very serious problem with using the tableview in bsp .The requirement is to add new rows to the tableview and update this content to internal table.The problem is when i enter some value in column and hit any button or triggered any event ,the value of column in table view gets cleared and i couldn't able to captur the value to internal table ...
    can anyone please help me to  sort out this problem.

    Hi Senthil,
    I think this would provide solution to your problem.
    the problem is whenever you edit the value in the tableview view the associated internal table of the table view has to be updated with the new values. for that you need to read the cell value from the table view.
    as its a tableview, you should read the value from the exact cell whose value has been modified and update that value in the internal table. here is the psuedocode. hope it helps.
    loop thru the selected rows of the table,
    'selectedrowindextable'  this info you can get from
    table_event TYPE REF TO cl_htmlb_event_tableview.
        LOOP AT selectedrowindextable ASSIGNING <i>.
    itab is the table which actually stores that data
    which you pass to the table view
          READ TABLE  itab INTO wa_itab INDEX <i>.
          i_rownum = <i>.
          CONDENSE i_rownum.
    construct the id of the Cell whose value is to be read
    for table view name, if u r showing it as a view in a
    tray object prefix the table view name with tray object
    id followed by '_'
    to read column 'totalcost' in 5th row the cell name
    would be 'trayid_tableviewid[5].totalcost
    Alternative you can get this format from the
    request->get_form_fields method also
       CONCATENATE 'tabviewname[' i_rownum '].colname' INTO req_cell.
       CONDENSE req_cell.
       l_value = request->get_form_field( req_cell ).
       CONDENSE l_value.
       wa_itab-colname = l_value.
       MODIFY itab FROM wa_itab INDEX <i>.
    ENDLOOP.
    Let me know if you have any questions.
    thanks and Regards,
    Kumar

  • Add/Delete rows in TableView

    hi all,
    i wanna add rows in the tableView and also wanna delete the selected rows from the tableView.
    how to do it?
    regards,
    purushothaman.

    Hi,
    As Harish said, use addElement to add elements to the Vector (using which you have created the DefaultTableViewModel and assigned it to your tableview).
    Capture the index of the rows to be deleted and use
    <Vector>.removeElementAt(index) to remove the specific rows.
    Check out this link as well
    http://help.sap.com/saphelp_nw04/helpdata/en/a9/76bd3b57743b09e10000000a11402f/frameset.htm
    http://java.sun.com/j2se/1.5.0/docs/api/
    Thanks
    Senthil
    P.S: Reward points for useful answers

  • Unselect rows in tableview

    Hi,
    When I select the selected rows in MULTISELECT mode but when i try to clear that by clearing selectedRowIndexTable it is not working.
    What should i do ?
    Regards,
    Manav

    HI,
    U can try using the following code
    LAYOUT
        <htmlb:form>
         <htmlb:tableView id="tab1"
                      table="<%= itab %>"
                     visibleRowCount="8"
                      design="ALTERNATING"
                      footerVisible="TRUE"
                     selectionMode="multiSelect"
                     keepSelectedRow="true" >
         </htmlb:tableView>
    <htmlb:button  id = "but1"
                   onClick="test"/>
         <%if itab3 is not initial.%>
       <htmlb:tableView id="tab1"
                      table="<%= itab3 %>"
                     visibleRowCount="8"
                      design="ALTERNATING"
                      footerVisible="TRUE"
                     selectionMode="multiSelect">
         </htmlb:tableView>
       <%endif.%>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    TYPES
    types : tab type table of ZNW_SID_NUM_TEST.
    types : row type ZNW_SID_NUM_TEST.
    PAGE ATTRIBUTEs :
    Irow type row
    Itab type tab.
    Itab3 type tab.
    Itab2 type selectedrows.
    Rowselected type string.
    onCreate
    select * from ZNW_SID_NUM_TEST into corresponding fields of table itab
    onInputProcessing
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if  event->id = 'but1' and event->event_type = 'click'.
      DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW.
      tv ?= CL_HTMLB_MANAGER=>GET_DATA(
                      request      = runtime->server->request
                      name         = 'tableView'
                      id           = 'tab1' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
      tv_data = tv->data.
    refresh itab2.
    refresh itab3.
    call method tv_data->GET_ROWS_SELECTED
          receiving selected_rows = itab2.
    endif.
    data : ind type SELECTEDROW,
           row_s type row.
    if itab2 is not initial.
        data :rw LIKE LINE OF itab.
        loop at itab2 into ind.
          READ TABLE itab INDEX ind-index into
          rw.
           if rw is not initial.
           row_s = rw.
          append row_s to itab3.
          clear row_s.
          endif.
        endloop.
    endif.
    Endif.
    This gets the values selected in Multiselect mode and displays them in another table.
    Hope this helps,
    Regards,
    Siddhartha

  • After upgrading to CF10, the selected row of my cfgrid is no longer passed on form post.

    I have a cfform which contains a cfgrid and prior to the 9 to 10 update, upon submission of the cfform, the selected row of the grid was passed/posted to my form action page as:
    __CFGRID__gridForm__renewalGrid
    This contained all the data from the selected row, I.e.:
    __CFGRID__COLUMN__=PROJECTID; __CFGRID__DATA__=T01081002AP; __CFGRID__COLUMN__=APPLICATIONS; __CFGRID__DATA__=PQFD; __CFGRID__COLUMN__=OWNERUID; __CFGRID__DATA__=HT2008; __CFGRID__COLUMN__=TEAM; __CFGRID__DATA__=Roberts; __CFGRID__COLUMN__=ROLE; __CFGRID__DATA__=AASBOAPMX; __CFGRID__COLUMN__=REGION; __CFGRID__DATA__=Southwest; __CFGRID__COLUMN__=EXISTING; __CFGRID__DATA__=K8045F; __CFGRID__COLUMN__=SOD; __CFGRID__DATA__=0; __CFGRID__COLUMN__=INITIALEMAILDATE; __CFGRID__DATA__=01/28/2013; __CFGRID__COLUMN__=MESSAGEDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=SECONDEMAILDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=ESCALATIONDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=COMPLETEDBY; __CFGRID__DATA__=TH2878; __CFGRID__COLUMN__=COMPLETIONDATE; __CFGRID__DATA__=02/06/2013; __CFGRID__COLUMN__=MONTHPULLED; __CFGRID__DATA__=Jan2013; __CFGRID__COLUMN__=TOTALITEMS; __CFGRID__DATA__=2; __CFGRID__COLUMN__=RELIEVINGPSA; __CFGRID__DATA__=; __CFGRID__COLUMN__=MODIFIEDBYTS; __CFGRID__DATA__=02/06/2013; __CFGRID__COLUMN__=MODIFIEDBY; __CFGRID__DATA__=T228Y8; __CFGRID__COLUMN__=CREATEDBY; __CFGRID__DATA__=KV3M36; __CFGRID__COLUMN__=CREATEDTS; __CFGRID__DATA__=01/28/2013; __CFGRID__COLUMN__=NEWSA; __CFGRID__DATA__=; __CFGRID__COLUMN__=DELEGATESTATUSNOTE; __CFGRID__DATA__=Access; __CFGRID__COLUMN__=STATUS; __CFGRID__DATA__=Completed; __CFGRID__COLUMN__=DATATYPE; __CFGRID__DATA__=Appl New
    After upgrading to CF10, and with no changes to the code, performing this same process, __CFGRID__gridForm__renewalGrid is still passed in the form scope to my action page, but now it is empty.
    I have not yet uninstalled CF9, so I brought it up on a different port, and I can run the same code as CF9 or CF10 and watch... in 9 the selected row is passed, in 10 it is empty.
    Is this a bug? Is there a work around? Please help.

    appears that apple has changed SMB code, and now its not possible login from windows on mac.
    i installed snow leopard and now works fine.
    apple is capable to make it run paying new license of smb code, but isnted of this, apple has created new protocol smbx and now, all others need to adapt your code to apple..
    bad movement.. i am thinking sell imac and no back to apple anymore..

  • 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;

  • Select row button not getting displayed in alv grid.

    Hi ,
    As per my requirement I am using tab strip in module pool.
    Each tab strip is containing one ALV.
    And user can change delete or create one record when the alv is displayed.
    The same should be saved in the database and ALV should be refreshed.
    When I am displaying the ALV the left most option of the ALV with which I can select the whole row is not coming.
    Because of which I am unable to call the method to get the selected row and delete or change accordingly.
    Why this button is not coming?
    I am using set_table_for_first_display in my program.
    Please help.

    Hi,
    In the method SET_TABLE_FOR_FIRST_DISPLAY, you will have to change the Selection Mode to 'A'. I guess you are not passing any values to the Layout parameters.
    Once you do that, you will find what your are looking for.
    Data : LA_LAYO type LVC_S_LAYO.
    LS_LAYO_SEL_MODE = 'A'.
    and pass this to the method's layout parameter.
    Cheers,
    SKC,

Maybe you are looking for

  • How do I sync to a new Mac without losing anything

    My iPhone 4 is snced to my G5. I want to change the sync to my Mac Pro (on which I have a different user name). How can I achieve this without losing Contacts & Apps? Photos & Music I can add manually, so I'm not overly concerned about those. Will it

  • Using dynamic text in Flash Builder

    Hi, I'm trying to get some dynamic text to my web page. The text is readed from .txt file I use AS script which i was using in a project I made with Flash Pro and now i try to implement it in Flash Builder project The script look like this: var req:U

  • Issue creating a single PDF from MS Word on Mac

    Using Trial Version of Acrobat XI for Mac.  I am having issue creating a single PDF from MS Word on Mac.  Acrobat is creating multiple files splitting up randomly.  Are there any settings to select for ending up with just one PDF fil

  • Why is iTunes update not in apps store?

    There is an update abailable for iTunes, however when I click on download, the apps store upens but the iTunes update is not listed? MacMini OSX 10.8.3.

  • Dw cs4 -some links don't work, others do. whyyyyyyyyyy??????

    My links to "directions" and "gallery" from the home page don't work.  But, if you click on "request a quote" at the bottom of the home page, you can link to them from there.  I can't figure out why.  Also, as you can see my contact page shows up on