Sorting table view columns

Hi ,
In my application i want to sort specific tableview columns.When i am keeping Sort="server" .Now the hand point showing sort on every column.I wanted to restrict this to specific column.If you have information can you give how exactly sort option will work when sort by server and sort by application.
Any weblogs available on sorting of tableview columns.
Regards
Usman

Hi Usman,
you can do this either with a tableview iterator or with the extension htmlb:tableviewcolumn.
With the iterator you can change the behaviour of your columns in the method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. The attribute P_COLUMN_DEFINITIONS is of type TABLEVIEWCONTROLTAB. With this attribute you can check "SORT" for a special column.
With the extension htmlb:tableviewcolumn you can use the attribute SORT.
Hoping this helps.
Regards,
Rainer

Similar Messages

  • Calling a Breadcrumb image inside a Table view column

    Hi
    I want a sample code to call any bread crumb related image inside a table view column.
    Please help with a code snippet.

    I mean that, inside the iterator class of the tableView, write this code in the RENDER_CELL_START method.
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'ICON'.
    p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(       id        = p_cell_id                              src      = '@3J@'  ).
        ENDCASE.
    Inside the method, GET_COLUMN_DEFINITIONS you need to append a column for icon, see the code below:
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
        <def>-COLUMNNAME = 'ICON'.
        <def>-TITLE      = 'Display Icon'.
    For more info you can refer to weblog on HTMLB TableView Iterator by Brian.
    Hope I am clear.
    Regards,
    Ravikiran.C

  • Drag & drop from sorted table view to outline view in AppleScript Studio

    I want to make a drag and drop from a sorted table view to an outline view in applescript Studio.
    Problem is that the data are copied from the data source of the table view,
    wich is unsorted, rather than from the table view itself that is sorted.
    So I have the wrong data droped.
    The element wich is passed from the table view thru the outline view is the row number. Then the script find the data of the corresponding row of the data source of the table view(unsorted).
    I want the script, using the row number, to get the content of the displayed row of the table view (sorted).
    Any help welcome.

    I want to make a drag and drop from a sorted table view to an outline view in applescript Studio.
    Problem is that the data are copied from the data source of the table view,
    wich is unsorted, rather than from the table view itself that is sorted.
    So I have the wrong data droped.
    The element wich is passed from the table view thru the outline view is the row number. Then the script find the data of the corresponding row of the data source of the table view(unsorted).
    I want the script, using the row number, to get the content of the displayed row of the table view (sorted).
    Any help welcome.

  • Table view column headings

    Hello All,
           I populated an internal table and passed it to the table view.
    1, But here since I was not getting the Heading of each
       column properly i used TableviewColumn attribute of
       htmlb and manually gave the title for each column.
    2, Now I'm able to get the proper headings for each of my
       column.
    3, But I'm not getting the sort functionality for any of
       the columns.
       But,this functionality came before i used the
       TableviewColumn attribute.
      Can anyone help me in getting the <b>SORT</b>
      functionality along with my <b>Column Headings</b>.
    Regards,
    Deepu.K

    just for managing column definition you dont need to use iterator, you can use the following method.
    page attribute:
    col_control_tab     TYPE     TABLEVIEWCONTROLTAB
    col_wa     TYPE     TABLEVIEWCONTROL
       <%
      clear col_wa .
      move: 'EMP_NUMBER' to col_wa-columnname ,
      'Employee Number' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment ,
      'X' to col_wa-edit .
      append col_wa to col_control_tab .
      clear col_wa .
      move: 'EMP_NAME' to col_wa-columnname ,
      'Employee Name' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
      clear col_wa .
      move: 'COSTCTR' to col_wa-columnname ,
      'Cost Center' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
      clear col_wa .
      clear col_wa .
      move: 'CCTR_DESC' to col_wa-columnname ,
      'Description' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
      clear col_wa .
      move: 'LOC' to col_wa-columnname ,
      'Location' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
          %>
          <htmlb:tableView id                  = "tv1"
                           allRowsEditable     = "TRUE"
                           design              = "STANDARD"
                          <b> columnDefinitions   = "<%= col_control_tab %>"</b>                       selectionMode       = "NONE"
                           table               = "<%= emp_tab %>"
                           width               = "100%"
                           columnHeaderVisible = "true" />
    Regards
    Raja

  • Table view column rendering

    Hello -
    I am using <htmlb:tableViewColumn> in <htmlb:tableView>  to specify  titles and columnName of the internal table.
    Probelm i am getting here is :
    One of the column type is material which is type of domain matnr ( character type ) . My leading zero's in material not getting rendered.
    At the same time,another quantity field type NUMC getting leading zeros automatically.
    I want to have leading zeros as it is in material and remove leading zeros in quantity field. any ideas?
    Ex:Matnr(Char):  00613994560285 is rendering as 613994560285
    and quantity(NUMC)  - 1 rendering as 000001.
    i want to render as it is .
    Thanks
    Hari

    hello,
    SAP internally interpret and match the type mentioned in domain of the field...
    so for matnr it gets type C
    and for quantity gets type P with /  without decimal type....
    solution of problem:
    build one customize DDIC structure with type N for matnr and suitable one for quantity
    create one table type with that structure...
    use that table type to build an internal table to get data displayed in table view...
    Thanks
    Krish

  • Table view column cell Focusing while editing.

    I have a table view with single column. I have defined custom cell factory for this column. When the table renders, a text value is shown for each cell in that column. When the user start editing the cells , then the contents of the cell changes and it shows 2 buttons, few check boxes and few radio buttons. Once the user selects his choice and clicks on a button inside the cell, the cell's editing is completed and cell's content is replaced with a plain text field.
    Now while editing if the user clicks on any other cell, the current editing cell's cancel method is called and text field is show. However, if the user clicks mouse outside the table, the cell is still in editing state.
    1) how to call the cancel editing method automatically here.
    2) Also, if we try to associate with focus property, how to do it. i.e. on which component should I associate focused property since the cell now is replaced with a bunch of components.
    3) If the user tries to use up or down arrow, then how to stop or start editing on the next cells.
    Thanks.

    Have you assigned an action to the CheckBox.onSelect event? If not, there is no server roundtrip triggered and the visibility is not updated.
    I would create two context attributes "ColumnsVisible" (boolean) and calculated attribute "ColumnsVisibility" (Visibility), assign an empty action to the CheckBox.onSelect event, bind CheckBox.checked to "ColumnsVisible", TableColumn.visible to "ColumnsVisibility" and implement the calc. attribute getter as
    WDVisibility getColumnsVisibility(...)
      return element.getVisible() ? WDVisibility.VISIBLE : WDVisibility.NONE;
    Armin

  • Sorting table by columns

    I have table with id and 4 measures: Id, M1, M2, M3, M4.
    I want to present report with the top N ids - but I do not know what measure the user will want to sort by.
    I can create 4 reports - each report X will present Id, M1, M2, M3, M4 and will have filter when Rank(max(Mx))<N.
    a. I prefer create one report with some kind of column selector, but I could not add Rank(max(Mx)) to the selector - just Mx.
    How can I do it?
    b. If I will have the 4 different reports - I don't want to execute each time the 4 reports even if the user is interested only in one report.
    How can have the option of asking the suer to select measure Mx and then execute only the desired report X?
    Thanks,

    Hi,
    I will advice you to use RCOUNT(ID) instead of Rank.Try to implement the below steps and see if that helps
    1)Create a dummy column in your report and add RCOUNT(ID) to its formula.
    2)Lets say by default you have M1 in your report.Put a sort order according to your need i.e ascending or descending.
    3)Now put a filter on RCOUNT as RCOUNT is in top or bottom 10 according to your need.
    4)Put rest of the columns M2,M3,M4 in column selector created on M1.
    In this way you dont need to create diffrent views or reports and you will be able to filter the records because filter criteria is based on ID which is not changing,
    Thanks
    Sandeep
    Edited by: Sandeep Saini on 06-Sep-2010 09:32

  • Check box in a table view column

    Hi,
    I want to have a check box in a table (htmlb for java) for one column. In the table header when checked should automatically check all the check boxes in that column.
    Also let me know how to read the column if it is checked or not.
    Promise to reward you with points. Thanking u in advance.
    Subu.

    Hi ,
    just add the following code in your jsp page---
    for (int i = 1; i <= no_of_rows ; i++){
         for (int j = 1; j <= no_of_columns ; j++){
              if(i%2!=0){
    mytableView.setStyleForCell(i , j, TableCellStyle.GROUP_LEVEL2);
    else{
         mytableView.setStyleForCell(i , j, TableCellStyle.GROUP_LEVEL3);     
    as it is obvious,this code is to set different colors in alternative rows.
    myTableView is the id of TableView.
    Refer this link for different colors...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/26/f79241e9129f09e10000000a155106/frameset.htm---
    Hope this helps.
    Regards,
    Swarna
    Message was edited by: SwarnaDeepika

  • Showing Icons in the table view column

    I am using a tableview.
    In that tableview first column, i want to display the status as icon_green_light, icon_red_light like that as an icon.
    I am having these status values in my table...
    when i am assigning that itab to this tableview it is showing the text icon_green_light instead of showing the icon...
    please help me.

    check out this weblog
    /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator

  • How to not display the column header in the table view?

    I do not want to display the column header in the table view, how can I achieve it?

    If you're using JavaFX 8 you can use the following in an external style sheet:
    .table-view .column-header-background {
      -fx-pref-height : 0 ;
    If you're using JavaFX 2.2, the -fx-pref-height attribute is not available in css, so I think you have to resort to a lookup:
    final Region tableHeader = (Region)table.lookup(".column-header-background");
        tableHeader.setPrefHeight(0);
    As always, I feel obliged to point out that I don't really like lookups. Sometimes they seem to be the only way, though.

  • How to color a table view header's text via css

    I have managed to change font-name, background and text alignment of my table view header, but the text-fill line is just ignored! What's the correct way to do this?
    Example:
    .table-view .column-header, .table-view .filler {
    -fx-text-fill: white;
    -fx-font-family: "Helvetica";
    -fx-font-size: 10px;
    -fx-font-weight: bold;
    -fx-size: 25;
    -fx-border-style: solid;
    -fx-border-insets: 0 1 1 0, 0 0 0 0;
    -fx-border-width: 0.083333em, 0.083333em;
    I also added:
    .table-view.column-header.label{
         -fx-text-fill: white;
    Wich was recommended on a site, but didn't work either..

    I think you need
    .table-view .column-header .label{
      -fx-text-fill: white;
    }(with spaces between the class selectors).

  • Modify a Table View Header

    I need to modify the header of a tableview and I've tried this:
    .table-view {
        -fx-background-color: rgb(70,70,70);
        -fx-text-fill: white;
        -fx-border-style: solid;
        -fx-border-color: transparent;
    /*    -fx-border-insets: 0 1 1 0, 0 0 0 0;*/
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header{
        -fx-border-style: solid;
        -fx-border-color: rgb(130, 130, 130);
        -fx-border-radius: 5px;
        -fx-background-radius: 5px;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header .label{
        -fx-font-size: 12px;
        -fx-text-fill: white;
    .table-view .column-header-background {
        -fx-background-radius: 5px;
        -fx-font-family: "Calibri";
        -fx-background-color:  rgb(50,50,50);
    }However, I can not edit any table header but only the headers of each column.
    Sorry for the English and grammatical errors. I am Spanish speaking
    I put an image to make it more clear
    http://img823.imageshack.us/img823/49/tableexample.png
    Edited by: biochemistry43 on 30-oct-2012 13:17

    It is there in the CSS documentation, though it's not really very easy to pick out. See http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tableview and look at the section called "Substructure".
    I'm not claiming that I get everything I need to know from the CSS docs, though. I often need to look at the default stylesheet, caspian.css, which you can extract from the jfxrt.jar file (it's at com/sun/javafx/scene/control/skin/caspian/caspian.css).
    Edited by: James_D on Nov 5, 2012 6:10 AM (fixed path for caspian.css)

  • Table css column-header text color not working

    When setting
    -fx-text-fill: red;
    in a css table, it does not change the header to tex to red. Is there another value? .table-view .column-header {                                                                                                                                                                                                                                                                                                                   

    You have to override the following from the caspian.css:
    .table-view .column-header  {
        -fx-text-fill: -fx-selection-bar-text;
        /* TODO: for some reason, this doesn't scale. */
        -fx-font-size: 1.083333em; /* 13pt - 1 more than the default font */
        -fx-size: 25;
        -fx-border-style: solid;
        -fx-border-color:
              Inner border: we have different colours along the top, right, bottom and left.
              Refer to RT-12298 for the spec.
            derive(-fx-base, 80%)
            linear-gradient(to bottom, derive(-fx-base,80%) 20%, derive(-fx-base,-10%) 90%)
            derive(-fx-base, 10%)
            linear-gradient(to bottom, derive(-fx-base,80%) 20%, derive(-fx-base,-10%) 90%),
            /* Outer border: */
            transparent -fx-table-header-border-color -fx-table-header-border-color transparent;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header-background {
        -fx-background-color: -fx-body-color;
        -fx-padding: 0;
    }

  • Problem with Column Sorting in Request Table View

    We've enabled column sorting on the table view in an Answers request but it doesn't work when more than around 400 rows are returned. It works Ok when fewer than 400 rows are returned. Does anyone know if there is a specific limit to the number of rows where column sorting works?
    Thanks,
    Mike

    I've dug into the query log a little more. When this request returns more than around 400 records and you click on a column heading to sort the table view, the query from the log is not changing to reflect the new sort order. It stays as whatever the default sort order was for the request.
    Column heading sorting on other requests in different subject areas on this same server works fine. I've tested this other request with up to 6400 rows returning and it's sorting works.
    All caching is turned off for the subject area.

  • Disable sorting and resizing columns on table view

    Is there a way to disable sorting and resizing columns on table view?
    Thanks

    Use
    setSortable(false)
    setResizable(false)
    on each TableColumn

Maybe you are looking for

  • Weird New Problem

    Please help - I have many photos in IPhoto. They all had names assigned by the camera. In Finder I created an Automater to rename files. I renamed the files in the Data photo. Now when I open IPhoto they are blank in the window but if I click they op

  • ITunes 7.1 will not let me play any tracks...

    iTunes 7.1 will not let me play any tracks, it opens up fine and I can do pretty much anything else with it but when I double click or press play on a track an error message comes up and iTunes has to close. This has only been happening since I uploa

  • Last purchase and sales price

    Dear Experts, I do require a report in which we can compare last purchase vs sales price of same item. Item Code,  description, last purchase rate, last sales rate ,     Profit  ,     % 1234 ,            furniture   ,   1500.00  ,             1800.00

  • Forms configuration file in Unix

    Hi We're using Forms 9i. Is there any configuration file in Unix in wich I can set Forms to read .pll files instead of .plx? TIA, Marcos

  • Servlet and EJB on different machine: Security propagation

    Hi all, I have an application, where my servlets and EJBS are deployed on the same machine.So when in my servlet a user need to authenticate himself, security credentials are propagated to the EJB automatically.I'd like to know in the case where the