In a table,  Header of columns should be static

Hi
In my view layout, i have scroll container, in which there is a table.
As the rows are more, Scroll bar is coming on the rigth side of the table as expected. But when the user scroll down to the below rows, the header Row also going up, ie Header Row which contain names of column is getting invisible.
How to keep the header Row static. even user scroll down, the names of the columns should be visible.
note: As per the requirement i had made footer visible property to false
Thanks
Maha

hi ....
You may also try this....
You take a transperent container and add the text views .The number of text views that you have to add should be equal to the number of the
columns ...
Now in each text view you give the Column name which will give the
look and fell as the header for that column,and even when the data is more and if you scrolldown the headers will be visible for that column.
You better take Grid layout for the TC that your adding and give the col count as the number of columns ...and by adjusting the Width property of the textView ...you align these text views for each of your
table column.
Try this ...hope it helps ..We implemented it ....
Regards
Madhavi

Similar Messages

  • Is there a way to make a "table header" a column instead of a row?

    I am making a 508 compliant pdf from a predesigned indesign document that has many tables in it. The table that I am having problems with doesn't have it's table header as a Row at the top of the table but instead a Column that runs down the left side like this example:
    To be read correctly in the pdf by screen readers the header needs to be included in the table but I don't know how to make a column a header, I have only found the option of making a row a header. Is there a way to do this or will I just have to retag and reorder the tags in the pdf after?
    Thanks!

    @Joel – ah, now I begin to understand.
    Slapbet wants to change the reading order in a two column table from:
    Usually:
    1  2
    3  4
    5  6
    to:
    1  4
    2  5
    3  6
    If so, you need two separate tables:
    One for column 1, one for column 2.
    Grouped together, anchored in a text frame with the flowing text.
    Could the every column is a single table construct work for you?
    Or is it necessary for what ever reason (besides editing) to work with a single table?
    A script could help to split every  column to a single table, making a group and anchor it to the text flow.
    Or did I misunderstand what the problem here is?
    Uwe

  • JTable with custom column model and table model not showing table header

    Hello,
    I am creating a JTable with a custom table model and a custom column model. However the table header is not being displayed (yes, it is in a JScrollPane). I've shrunk the problem down into a single compileable example:
    Thanks for your help.
    import javax.swing.*;
    import javax.swing.table.*;
    public class Test1 extends JFrame
         public static void main(String args[])
              JTable table;
              TableColumnModel colModel=createTestColumnModel();
              TestTableModel tableModel=new TestTableModel();
              Test1 frame=new Test1();
              table=new JTable(tableModel, colModel);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(200,200);
              frame.setVisible(true);
         private static DefaultTableColumnModel createTestColumnModel()
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
              columnModel.addColumn(new TableColumn(0));
              return columnModel;
         static class TestTableModel extends AbstractTableModel
              public int getColumnCount()
                   return 1;
              public Class<?> getColumnClass(int columnIndex)
                   return String.class;
              public String getColumnName(int column)
                   return "col";
              public int getRowCount()
                   return 1;
              public Object getValueAt(int row, int col)
                   return "test";
              public void setValueAt(Object aValue, int rowIndex, int columnIndex)
    }Edited by: 802416 on 14-Oct-2010 04:29
    added                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Kleopatra wrote:
    jduprez wrote:
    See http://download.oracle.com/javase/6/docs/api/javax/swing/table/TableColumn.html#setHeaderValue(java.lang.Object)
    When the TableColumn is created, the default headerValue  is null
    So, the header ends up rendered as an empty label (probably of size 0 if the JTable computes its header size based on the renderer's preferred size).nitpicking (can't resist - the alternative is a cleanup round in some not so nice code I produced recently <g>):
    - it's not the JTable's business to compute its headers size (and it doesn't, the header's the culprit.) *> - the header should never come up with a zero (or near-to) height: even if there is no title shown, it's still needed as grab to resize/move the columns. So I would consider this sizing behaviour a bug.*
    - furthermore, the "really zero" height is a longstanding issue with MetalBorder.TableHeaderBorder (other LAFs size with the top/bottom of their default header cell border) which extends AbstractBorder incorrectly. That's easy to do because AbstractBorder itself is badly implemented
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6459419
    Thanks for the opportunity to have some fun :-)
    JeanetteNo problem, thanks for the insight :)

  • Clicking the table header column programmatically

    Hi
    For sorting of the JTable I've used the TableSorter API provided in this site. What I need to do is by clicking on another panel the panel containing the JTable should be displayed sorting the respective column. So what I need to do is click the table header column programmatically. Do you know how can I do that.
    Thanx.

    Take a look at setSortingStatus function in TableSorter.
    If you want ascending sort just call:
    setSortingStatus(columnIndex, 1);This is the code executed when you press table header, it might give you some more insight:public void mouseClicked(MouseEvent e) {
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1) {
                    int status = getSortingStatus(column);
                    if (!e.isControlDown()) {
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
            }

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How do I create a header in the response table for a column I want to use that is not on the form it

    Example: My form has 10 fillable questions.  The Response table uses 10 columns to show the answers to those questions.  I would like to use 3 more columns to record internal information.  How do I insert the header titles?

    Hi,
    You can go to Responses view tab, focus on your last column header and then click menu Table->Add Column After. Or you click + button at the end of table - refer below image.
    I am not clear your question "How do I insert the header titles?" Do you mean you want to use your form title as data value in each cell in the column? If yes, you can set formula in the column following below steps.
    1. Click +Add a Row button
    2. Focus on the cell on column L (I assume you want to set your formular on this column).
    3. Input ="your form title" into the cell
    Then after you received a submission, the form title would display in the related cell in each row.
    Hope it will help you.
    Thanks,
    Ying

  • How to swap column-data along with Table header

    Hi All!
    I found a smple JTableDemo.java class. When I run it it provided sorting on the table as well as Dragging Column-data along with Table header while swaping two columns-headers.
    I designed my own table and apply some changes to TableModel. Afterwords it swaps Table-Headers only, but not their respective columns.
    Can someone give me a clue for that, where the logical error may be?
    Thanx in Advance

    surprised.. since you have asked, it must have some more tricky issue. Any way what i thought of it
    in before insert on table2
    simply insert into table1 (cr_id) values (:new.cr_id_id);
    i assume that table1 pk does not generated through sequence
    proposed insertion will not violate the uniqueness and create another record only in table1
    what is thehidden agenda for not using simple before insert trigger as above.
    yours
    dr.s.r.bhattachar

  • Repeat header's column in a table with row height that greater then 200px

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I develop a website and encounter some problem about web page printing. I try to repeat header's column in a table with row's height that greater than or equal to 198px, but it doesn't work. Another size that lower than 198px works fine. If somebody has seen this issue before and know a solution, please help me. Thanks in advance.
    == This happened
    ==
    Every time Firefox opened
    == Firefox version
    ==
    3.6.6
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
    == Plugins installed
    ==
    *-6.0.12.1739
    *RealPlayer(tm) LiveConnect-Enabled Plug-In
    *PDF-XChange Viewer Netscape Gecko Plugin
    *Default Plug-in
    *Shockwave Flash 8.0 r22
    *Adobe Shockwave for Director Netscape plug-in, version 11.0
    *3.0.40624.0
    *Office Live Update v1.3
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    *Npdsplay dll
    *DRM Store Netscape Plugin
    *DRM Netscape Network Object

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
    [http://forums.mozillazine.org/viewforum.php?f=25]
    You'll need to register and login to be able to post in that forum.

  • Some of the pivot table header column not center-aligned

    I've dragged a pivot table model from Data Controls. The generated pivot table on page does not display some of the header columns center-aligned. I tried to set a css style in HeaderFormat listener for the columns, but it did not work. I checked the html source code and found the problem was caused by "colspan" not created properly. I'd like to know how pivot table header columns are created, anyone who knows please kindly give some tips,thanks!

    Try setting the Header Row to allow to repeat. I've had to set that Repeat option to get things to break over pages correctly.
    Ryan D. Lunka
    Cardinal Solutions Group
    [email protected]

  • No prefWidth setting on table header drag all columns size to small values

    All
    I have a regular table with no column sizing. When I drag a column to move it all columns resize to a very small width. If it set the prefWidth property
    then I don't see this issue as they default to the pref. Is this a feature or bug?

    Hi Gawish,
    Thanks for the reply.
    This will make the particular column frozen and only work for that particular column.
    My use case is that to remove the resize columns option from the context menu or to disable the right click option.
    Making column selection as none will disable the right click option but we need column selection for sorting.
    Is there any other way to achieve this?
    Thanks in advance,
    -Vignesh S.

  • How to hide the table header if no data present

    Hi
    I need to hide the table header if no data present. Table has 5 column. if no any clolumn has data then this table section should not be display.
    i am using <?if:count(Installation_Event_S19)= 0?> but this is not work for me.
    Could you please help me out.
    Thanks
    Indrajeet Kumar

    Hi Priya,
    Thank you very much !!! its work fine.
    Thanks
    Indrajeet Kumar

  • How to add One Button to the Table Header.

    Hi,
    I would like to have few Table Header columns as Button and Other Table Header Columns as String. And each Button should have separate action. Please let me know, how can i implement this one.
    Thanks
    Mohan

    do not cross post, this is a bad habit. now do you know about www.google.com. well this is a search engine, learn how to use it before you post. i got this link with this keyword search.
    http://www.exampledepot.com/egs/javax.swing.table/pkg.html
    http://forum.java.sun.com/thread.jspa?threadID=560605&tstart=15
    hope this helps you
    regards
    Aniruddha

  • How to add a Button to the Table header

    Hi,
    I would like to have few Table Header columns as Button and Other Table Header Columns as String. And each Button should have separate action. Please let me know, how can i implement this one.
    Thanks
    Mohan

    cross post
    http://forum.java.sun.com/thread.jspa?threadID=5195296

  • Sparse table with many columns

    Hi,
    I have a table that contains around 800 columns. The table is a sparse table such that many rows
    contain up to 50 populated columns (The others contain NULL).
    My questions are:
    1. Table that contains many columns can cause a performance problem? Is there an alternative option to
    hold table with many columns efficiently?
    2. Does a row that contains NULL values consume storage space?
    Thanks
    dyahav

    [NULLs Indicate Absence of Value|http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10743/schema.htm#sthref725]
    A null is the absence of a value in a column of a row. Nulls indicate missing, unknown, or inapplicable data. A null should not be used to imply any other value, such as zero. A column allows nulls unless a NOT NULL or PRIMARY KEY integrity constraint has been defined for the column, in which case no row can be inserted without a value for that column.
    Nulls are stored in the database if they fall between columns with data values. In these cases they require 1 byte to store the length of the column (zero).
    Trailing nulls in a row require no storage because a new row header signals that the remaining columns in the previous row are null. For example, if the last three columns of a table are null, no information is stored for those columns. In tables with many columns, the columns more likely to contain nulls should be defined last to conserve disk space.
    Most comparisons between nulls and other values are by definition neither true nor false, but unknown. To identify nulls in SQL, use the IS NULL predicate. Use the SQL function NVL to convert nulls to non-null values.
    Nulls are not indexed, except when the cluster key column value is null or the index is a bitmap index.>
    My guess for efficiently storing this information would be to take any columns that are almost always null and place them at the end of the table definition so they don't consume any space.
    HTH!

  • Resizing table header of diffrent table

    hi all,
    i have 3 tables, the first table having the table header.
    if resize the first table header than all other 2 should be resized accordingly.
    i have done this demo, i want to know is this correct way.
    or ony other suggestion.
    the problem with this i am setting the tablecellrender for the first table header, it will cause the problem, because i am setting table header column model for other 2 tables as a column model.
    import java.awt.Component;
    import java.awt.Dimension;
    import javax.swing.Box;
    import javax.swing.BoxLayout;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableCellRenderer;
    public class TableHeaderCellRenderr extends JFrame
        JTable table1 = new JTable(5, 5);
        JTable table2 = new JTable(5, 5);
        JTable table3 = new JTable(5, 5);
        public TableHeaderCellRenderr()
            JPanel pnl = new JPanel();
            pnl.setLayout(new BoxLayout(pnl, BoxLayout.Y_AXIS));
            pnl.add(new JScrollPane(table1));
            pnl.add(Box.createVerticalStrut(10));
            pnl.add(table2);
            pnl.add(Box.createVerticalStrut(10));
            pnl.add(table3);
             table2.setTableHeader(table1.getTableHeader()); // this is what it doing the resizing width of the other tables
             table3.setTableHeader(table1.getTableHeader());
             table2.setColumnModel(table1.getTableHeader().getColumnModel());
             table3.setColumnModel(table1.getTableHeader().getColumnModel());
            cellrenderer leftRenderer = new cellrenderer();
            table1.getTableHeader().setDefaultRenderer(leftRenderer);
            getContentPane().add(pnl);
            setSize(new Dimension(400,400));
            setVisible(true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
        public class cellrenderer extends DefaultTableCellRenderer
            public cellrenderer()
                super();
                setOpaque(false);
            public Component getTableCellRendererComponent(JTable table, Object value,
                                                           boolean isSelected, boolean hasFocus,
                                                           int row, int col)
                JLabel lbl = (JLabel) super.getTableCellRendererComponent(table, value, isSelected,
                                                                          hasFocus, row, col);
                lbl.setBorder(UIManager.getBorder("TableHeader.cellBorder"));
                lbl.setFont(table.getTableHeader().getFont());
                return lbl;
        public static void main(String[] args)
            new TableHeaderCellRenderr();
    }thanks
    dayananda b v

    if i reload or refresh whole GUI the table header is moving from first table to the next table,
    i know this is because of same table header i am setting for the other table header,
    how can i achive this Functionality some other way, any suggestions.
    thanks
    daya

Maybe you are looking for

  • Acrobat Plug In...Could not find external window handler

    When I try to open a pdf file with Adobe Acrobat, my computer gives me a prompt, Acrobat Plug In...Could not find external window handler... The problem just started recently.  I am running Adobe Acrobat 6.0 and the ME version of Windows.  The Micros

  • Images in a popup window

    Hi, I have some difficulty displaying images in a popup window. The (Tomcat 5.5) server apparently sends them with a content type of utf-8 text, which leads to an exception page shown in the popup window instead of the picture. In web.xml I checked t

  • I1112 status of Shopping cart- Need to create a follow on document

    Hello Experts, I have one issue in which enduser had created a shopping cart and header status is approved but no follow on document is generated. at line item level the status is Error in Process. When i ran the report BBP_ALERT_SB_NOTTRANSFERED. th

  • Cross-mailbox conversation expansion doesn't work

    In Mail for Mountain Lion, when a conversation has messages in different mailboxes, the gray box to expand/collapse the conversation doesn't work. The number of messages shown only reflects the ones in the Inbox (or active mailbox, probably; I've onl

  • Webdynpro standard app is failing to change description accord to sort code

    Hi Gurus, I have an issue in standard webdynpro application Personal Information->Bank Information-> If I change the sort code of the bank account it should display the bankname which is associated with the particular sortcode. but its not happening