Setting Two Headers in display Table

Hi,
I want to set 2 headers in display table like one is main header and one is sub header. Example is like following:
MAIN HEADER | MAIN HEADER |
SUB 1 | SUB 2 | SUB 3 | SUB 4 |
Data1 | Data 2 | Data 3| Data 4 |
I have to generate this type of table using <display:table> tag and also i
want this both headers to be fixed and the data to be scrolled in page.The data is to be scrollable both horizontally as well as vertically. The header and subheader would remain fixed when vertical scrolling and would scroll with data incase of horizontal scrolling.
Please help.
Thanks
Pranav.Parmar

Panavar,
I presume <display:table> is http://displaytag.sourceforge.net/10/tagreference.html ... interesting.
1. have you tried <td colspan=2> ???
2. have you tried subtables for the subheadings ???

Similar Messages

  • Setting Two Decimals in Pviot Table

    Hi,
    I create a report in pivot table In measures i duplicated the measure value and calculated the percentage by using Show data of percent of row column option on measure. i am getting correct percent but i am not able to set the percent value to two decimals .Any suggestion
    Thanks In Advance

    cast as float or multiply by 1.00 or see
    Re: show as percent - format change

  • JTable column headers not displaying using custom table model

    Hi,
    I'm attempting to use a custom table model (by extending AbstractTableModel) to display the contents of a data set in a JTable. The table is displaying the data itself correctly but there are no column headers appearing. I have overridden getColumnName of the table model to return the correct header and have tried playing with the ColumnModel for the table but have not been able to get the headers to display (at all).
    Any ideas?
    Cheers

    Class PublicationTableModel:
    public class PublicationTableModel extends AbstractTableModel
        PublicationManager pubManager;
        /** Creates a new instance of PublicationTableModel */
        public PublicationTableModel(PublicationManager pm)
            super();
            pubManager = pm;
        public int getColumnCount()
            return GUISettings.getDisplayedFieldCount();
        public int getRowCount()
            return pubManager.getPublicationCount();
        public Class getColumnClass(int columnIndex)
            Object o = getValueAt(0, columnIndex);
            if (o != null) return o.getClass();
            return (new String()).getClass();
        public String getColumnName(int columnIndex)
            System.out.println("asked for column name "+columnIndex+" --> "+GUISettings.getColumnName(columnIndex));
            return GUISettings.getColumnName(columnIndex);
        public Publication getPublicationAt(int rowIndex)
            return pubManager.getPublicationAt(rowIndex);
        public Object getValueAt(int rowIndex, int columnIndex)
            Publication pub = (Publication)pubManager.getPublicationAt(rowIndex);
            String columnName = getColumnName(columnIndex);
            if (columnName.equals("Address"))
                if (pub instanceof Address) return ((Address)pub).getAddress();
                else return null;
            else if (columnName.equals("Annotation"))
                if (pub instanceof Annotation) return ((Annotation)pub).getAnnotation();
                else return null;
            etc
           else if (columnName.equals("Title"))
                return pub.getTitle();
            else if (columnName.equals("Key"))
                return pub.getKey();
            return null;
        public boolean isCellEditable(int rowIndex, int colIndex)
            return false;
        public void setValueAt(Object vValue, int rowIndex, int colIndex)
        }Class GUISettings:
    public class GUISettings {
        private static Vector fields = new Vector();
        private static Vector classes = new Vector();
        /** Creates a new instance of GUISettings */
        public GUISettings() {
        public static void setFields(Vector f)
            fields=f;
        public static int getDisplayedFieldCount()
            return fields.size();
        public static String getColumnName(int columnIndex)
            return (String)fields.elementAt(columnIndex);
        public static Vector getFields()
            return fields;
    }GUISettings.setFields has been called before table is displayed.
    Cheers,
    garsher

  • Table with two headers

    i have a designed a table with 2 headers(say H1 AND H2), and  dynamic body rows (with three columns)
    the issue is when the table is oveflowing in to next page only one of the header is showing on the next page,
    i have noticed that the option 
    " INCLUDE HEADER ROW IN SUBSEQUENT PAGES" would not check for both the header rows , if i check it for say H1 then that option for H2 gets deselected. How do i resolve it..?
    Thanks in advance

    Hi Paul,
    Thanks for your suggestion
    so,
    now i am looking in to combining two headers together , but i am not sure how to do,
    right now i had wrapped the whole table in to  a subform , say S5
    and there are now two header rows
    Header row[0]
    header row[1]
    and
    body row
    i am trying to wrap the two headers as you suggested , but not sure how to proceed on. i have attached the pdf, can you please suggest me the changes. The table :"Table2"  is  Page 3 of the form.
    Thank you

  • Setting field header width in table control

    I have created  a table control by using the wizard and i am populating my internal table data in to this.
    Here i have small issue.
    There are two fields called recoverable, identifiable with char (1).
    These two field headers are displayed as R, I on the table control.
    Is there any way that i can adjust the field width to accomodate the header.
    points will be awarded immediately.
    Thanks

    In SE51 (Screen Painter), select/click-on the field (not the column header).
    Press F2 (to get the Properties window) and set the Visible Length to a larger number.  Save and activate the screen.

  • Setting two JTextFields inside JTable cell

    hi,
    I am really stick trying to figure out how to set two cells inside a JTable cell. This needs to be done because if there is a value already inside the cell then i want to drop another value - this new value should be displayed inside another cell but along with the other value already in the cell.
    I assume that i would need to create two JTextFields.
    But can anyone help me further please.

    That should be a simple issue of customizing table cell editor and renderer.
    See tutorials.

  • How to set a view in display mode??

    Hi,
    I have created a new view in overview page of BT111H_OPPT.
    This view is of table type and associated with value node .
    I am able to display contents of table on UI but they are in editable mode.
    I need them in display mode .
    How to achieve this functionlaity??
    Any suggestions will be helpful.
    thanks
    kanika

    Hi Kanika,
    There are 2 ways:
    In the configuration of your view you can set the fields as display mode.
    In the method get_i* of your atributtes you can disable the field too.
    I think the better solution is using the configuration.
    Best regards,
    Caíque Escaler

  • How do i set the background of the table( not of cell / row / column).

    How do i set the background of the table( not of cell / row / column).
    What happens when i load the applet the table is blank and displays the background color is gray which we want to be white.
    We tried using the setBackGround but it is not working maybe we are not using it properly. Any help would be gr8.
    Thanks in advance.

    I don't understand very well, but i guess that the background is gray when the table content's empty, isn't it?
    When the table model is empty, the JTable doesn't paint, so its container displays its background (often gray).
    In this case, what you must do is force the table to paint, even if the model is empty. So, you have to create your own table and override three methods :
    public class MyTable extends JTable
    //specify the preferred and minum size when empty
    myPreferredWidth = 200;
    myPreferredHeigth =200;
    myMinimunWidth = ...;
    myMinimunHeigth = ...;
    public Dimension getPreferredSize()
    if(getModel().getRowCount() < 1)
    return new Dimension(myPreferredWidth, myPreferredHeigth);
    else
    return super.getPreferredSize();
    public Dimension getMinimumSize()
    if( getModel().getRowCount() > 0)
    return new Dimension(myMinimunWidth, myMinimunHeigth);
    else
    return super.getMinimumSize();
    protected void paintComponent(Graphics g)
    if (getModel().getRowCount<1 && isOpaque()) { //paint background
    g.setColor(Color.white);
    g.fillRect(0, 0, getWidth(), getHeight());
    else super.paintComponent(g);
    }

  • How to write two triggers on same table how it works?

    Hello sir..
    I have to write two triggers on same table for auditing different columns of different pages (may be different modules).
    I will have an audit table in which i will insert data such as (user_id,module_id,column_name,old_col_val,new_col_ val,timestamp)
    Now different users from different pages will update the data on same table may be same columns!
    If we write directly, we will not be able to know which column is updated from different pages.
    My question is how can we control the triggers to raise based on the pages

    A trigger is executed whenever the table is inserted / updated / deleted (depend on trigger definition). It won't know what 'page' caused the operation. You can prepare a trigger for one page.
    In order to fulfill your need, you need some way to tell the trigger where you are. There are many ways to accomplish this. Some possible methods are (please check the documents for detail)
    DBMS_SESSION.SET_IDENTIFIER
    DBMS_APPLICATION_INFO.SET_MODULEFor example, you can call DBMS_SESSION.SET_IDENTIFIER to set an ID from your page, and then call sys_context to read the ID back:
    In Page:
    exec dbms_session.set_identifier('Page1');
    ...In Trigger
    pageid  := sys_context('USERENV', 'CLIENT_IDENTIFIER') ;
    ...Note that if you use a connection pool, you may need to properly reset the session information before return, in order to avoid messing up the session information when the connection is used next time.

  • Two triggers on same table

    Hi Friend.
    I have to write two triggers on same table for auditing different columns of different users(may be different modules).
    I will have an audit table in which i will insert data such as (user_id,module_id,column_name,old_col_val,new_col_val,timestamp)
    Now different users from different modules will update the data on same table may be same columns from different front end forms!
    If we write directly, we will not be able to know which column is updated by which user.
    My question is in this case how can we control the triggers to raise differently?

    You can use WHEN clause to fire a trigger only when some condition is true - you can check an user also,
    look at simple example:
    - suposse we have two users US1 and US2:
    C:\>sqlplus sys as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Pn Gru 6 13:14:22 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user us1 identified by us1;
    User created.
    SQL> create user us2 identified by us2;
    User created.
    SQL> grant connect, resource to us1, us2;
    Grant succeeded.
    SQL> grant create public synonym to us1, us2;
    Grant succeeded.and suposse we have a table with three columns + audit table:
    SQL> connect us1
    Enter password:
    Connected.
    SQL> create table tab123(
      2  col1 number,
      3  col2 number,
      4  col3 number);
    Table created.
    SQL> create table audit_tab123(
      2  username varchar2(100),
      3  col1 number,
      4  col2 number,
      5  col3 number );
    Table created.
    SQL>  grant select, update, insert on tab123 to us2;
    Grant succeeded.
    SQL>  grant select, update, insert on audit_tab123 to us2;
    Grant succeeded.
    SQL> create public synonym tab123 for tab123;
    Synonym created.
    SQL> insert into tab123 values( 1, 1, 1 );
    1 row created.
    SQL> commit;
    Commit complete.We want a trigger that is fired only by user US1 and only after update of COL1 and COL2
    (COL3 is ignored):
    SQL> connect us1/us1
    Connected.
    SQL> CREATE OR REPLACE TRIGGER Trig_123_US1
      2  AFTER UPDATE OF col1, col2 ON tab123
      3  FOR EACH ROW
      4  WHEN ( user = 'US1' )
      5  BEGIN
      6    INSERT INTO audit_tab123( username, col1, col2 )
      7    VALUES( user, :new.col1, :new.col2 );
      8 END;
    SQL> /
    Trigger created.And we want a second trigger that is fired only by user US2 and only after update of COL2 and COL3
    (COL1 is ignored):
    SQL> connect us1/us1
    Connected.
    SQL> CREATE OR REPLACE TRIGGER Trig_123_US2
      2  AFTER UPDATE OF col2, col3 ON tab123
      3  FOR EACH ROW
      4  WHEN ( user = 'US2' )
      5  BEGIN
      6    INSERT INTO audit_tab123( username, col2, col3 )
      7    VALUES( user, :new.col2, :new.col3 );
      8  END;
      9  /
    Trigger created.and now let test our triggers:
    SQL> connect us1/us1
    Connected.
    SQL> update tab123 set col1 = 22;
    1 row updated.
    SQL> update tab123 set col2 = 22;
    1 row updated.
    SQL> update tab123 set col3 = 22;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select * from audit_tab123;
    USERNAME         COL1       COL2       COL3
    US1                22          1
    US1                22         22
    SQL> connect us2/us2
    Connected.
    SQL> update tab123 set col1 = 333;
    1 row updated.
    SQL> update tab123 set col2 = 333;
    1 row updated.
    SQL> update tab123 set col3 = 333;
    1 row updated.
    SQL> commit
      2  ;
    Commit complete.
    SQL> select * from us1.audit_tab123;
    USERNAME         COL1       COL2       COL3
    US1                22          1
    US1                22         22
    US2                          333         22
    US2                          333        333As you see, each trigger is fired only once, first triger only for user US1 and columns COL1 and COL2,
    and second trigger only for user US2 and only after update of COL2 and COL3.
    I hope this will help.

  • I need two header line in table control

    Hi all,
    I am using table control. The requirement is to have 2 headers in the table control. for example., if their is field name ' Vendor Comments', I need to display 'Vendor' in one line and 'Comments' in next line. Is it possible to have such 2 headers for 1 field?
    If have answer please reply me.
    Thanks in advance,
    Kaarthick

    You cannot do this in table control in dynpro environment. Maybe you can check the ALV to get more flexibility about header titles.

  • Display Table contents using HTMLB...Urgent Help Plz...

    Hello All,
    Im working on EP SP14 and SQL Server 2000.
    I have successfully established database connection.
    I want to know <b>how can I display Table contents using TableViewModel in HTMLB</b>.
    Please help.
    Its urgent.
    Awaiting Reply.
    Thanks in advance,
    Uday<b></b>

    See /thread/80270 [original link is broken]
    (please stop crossposting every question into two forums; thanks in advance)

  • Setting Column selection on transposed table

    Hi,
    I have a problem with a jTable I am using in a program. The table has a rotate feature which works correctly. To do this I am reversing the getColCount() and getRowCount() methods within a seperate tableModel and setting this model on the table when the user clicks rotate (table headers are dealt with seperately, don't relate to problem).
    This all works fine but when I select something within the rotated table I want the column to highlight. I thought that using setRowSelectionAllowed(false), and setColumnSelectionAllowed(true) would give me the desired result but it doesn't.
    I can perform this on the table when it is not rotated, but when I rotate the jTable it ignores any properties about selection I have provided.The code is listed below:
    //Method called on button click to rotate table
    public static void transpose(JTable pTable, JTable pTableFixed, JScrollPane pScrollPane){
            //if table is not transposed apply transposed tableModel
             if(transposed == false){
                 pTable.setModel(ahkTableModel.getTranposeModel(pTable)
                      pTable.setRowSelectionAllowed(false);//won't apply call
                      pTable.setColumnSelectionAllowed(true);//won't apply call
                 pTable.setRowHeight(0,1); // hide row
                 pTableFixed.setVisible(false); //hide fixed table from non- rotated table
                  //Add new row headers  table to rotated table
                  JTable rowHeaders = new JTable(new String[][]{{"sample_number"},{"status"},{"ref"},{"comment"}},new String[]{"Lot"});
                  rowHeaders.setEnabled(false);
                  rowHeaders.setRowHeight(17);
                  rowHeaders.setRowHeight(0,1);
                  rowHeaders.setBackground(new Color(238,238,238));
                  transposed = true;
    //Apply cell renderer to each column
                       for(int i = 0;i< pTable.getColumnCount();i++){
                            TableColumn col = pTable.getColumnModel().getColumn(i);
                            col.setCellRenderer(new TableImageRenderer(true));
    //apply table properties method to position on scrollPane
                   ahkTableModel.setTableProperties(pScrollPane, pTable,rowHeaders);
              //reverse procedure if table is rotated and user wants to rotate back     
             } else{
                 boolean[] baEditableColumns = {false, false, true, true};
                 pTableFixed.setVisible(true);
    //set original model on table again
                 pTable.setModel(ahkTableModel.getTableModel(0,baEditableColumns));
                 transposed = false;
                  setColumnProperties(pTable,pTableFixed, pScrollPane);
         }Thanks for your assistance.
    Alan

    Any Ideas at all guys?? Really stumped with this problem there just doesn't seem an obvious explanation.
    Thanks.
    Alan

  • How to set two attributes as  a primary key in database ?

    how to set two attributes as a primary key?
    Take COffeesbreak as an example ,
    let's suppose that there are cof_name ,sup_id,price and so on;
    the same cof_name may be suplied by more sup_ids,
    and one sup_id may suply more cof_names.
    so the Primary key should be set the cof_name and sup_id ,
    how to set ?
    (of course that i konw if I set a cof_id,the problem will be easy work out
    but now there are those like above)
    I set that as following:
    create table coffees (cof_name VARCHAR(32) PRIMARY KEY,sup_id INTEGER, PRIMARY KEY,PRICE INTEGER )
    THE database print error :cant add more primary keys!
    thanks in advance

    You can only use the PRIMARY KEY declaration on a column if it is the only Primary Key column.
    Use the PRIMARY KEY constraint statement instead.
    create table coffees (
      cof_name VARCHAR(32),
      sup_id INTEGER,  
      PRICE INTEGER,
      PRIMARY KEY ( cof_name ,sup_id )
    )Dave

  • Headers/footers in table

    Hello,
    I want to create a table like a bank receipt. For the calculation of the sums I have already found a solution
    In the header
    Date | Credit | Debit | Currency
    Total | sum | | EUR
    So I fact I want two headers
    In the footer I want to have to start amount (but this I heave already found)

    <p>
    Hi,
    </p>
    <p>
    I created blog entry , maybe it helps you.
    </p>
    <p>
    Kuba 
    </p>

Maybe you are looking for

  • Custom command problems on Mac OS X

    I am seeing a problem with custom context commands in our custom connector that is also reproducible with the sample FTP connector shipped with the SDK.  I am using Adobe Drive 3.2.0.41 on Mac OS X 10.8.2 For my test I am connecting to a FTP server a

  • Logic Crashing, food for thought...

    I posted this in another thread, but thought it might be worth posting separately. First, keeping in mind that crashes probably happen to Logic users all around the world running different versions on different computers with varying amounts of plugs

  • Unable to order book printing

    Hello, I am living in Spain and I'm having trouble buying a book using iphoto 11. When I click to (buy book), this is the message that appears: "An error occurred while contacting the Apple Online Store. Please try again." I have two days trying to p

  • Using iMac G4 with airport

    I have an imac g4 - the kind that has the display sitting on top of the dome-shaped hard drive. I am finally getting an airport base station and switching my other two laptops over to wireless. Do I need a card or something to get my imac (which I th

  • Void interface

    Hi, I need to trigger a XI interface from R/3 (Abap Proxy) that will trigger a void Stored Procedure. There is any way to do this? ABAP Proxy -> XI Interface -> Stored Procedure There are <b>no field</b> mapping between all parts. Thanks.