Can i change the column width in a table row dynamically

Hi,
There are two columns in one of the row of the table, can i change the width of the cells dynamically.
Sometimes one of them will be blank and the other cell has to print the entire string .
Left cell is left aligned and the right cell is right aligned.
I tried to change the width using field.W but it didnot work.
Regards,
Sobhan

Hi,
We can change the column width of a column dynamically. Try the javascript code in the appropriate event.
Table.columnWidths = "2in 3in 4in 5in";
Thanks & Regards,
Sanoosh

Similar Messages

  • Change the column width on the fly

    Dear all,
    I have a problem, i have a matrix report, the row is "the project name" and the column is "the items" using within each project, and the problem is the items are variable from time to time the report run for each project, so its exceeds the paper width.
    And the question is, is there any way to change the width of the column on the fly, i mean dynamiclly change the column width each time the report is called to make all items fit the paper width.
    Thank u

    i don't think that we can change the layout of the column in reports
    The simple solution for that problem is that u have to
    fix the horizontal and vertical layout of the text item
    better is to post this problem at reports forum
    Najeeb

  • How to change the column width in Smartforms..?

    Hi All..
    I need to change the column width in a smartform.
    The requirement has been mentioned as follows...
    Adjust the column width of the following columns:
    MATERIAL: 14 char
    DESCRIPTION: 20 char
    How to perform this..??
    Where can i find the column width of various columns of a smartform..???
    Please Help me...
    Regards
    Pavan

    In the SMART Forms, you would have created a Table object and specified the line width and divided that into no. of columns that you want, you have to mandatorily specify the width of each column so that total of column width will be equal to that of the line width.
    When you double click on the Table object, you can TABLE tab on the right side. If you can't see the line / columns details, click on the DETAILS button.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • How can i set the column width in the jtable?

    how can i set the column width in the jtable?
    can anybody send me a simple example??

    TableColumn column = table.getColumnModel().getColumn( columnIndex );
    column.setWidth( desiredColumnWidth);
    column.setMinWidth( desiredMinColumnWidth);
    column.setMaxWidth( desiredMaxColumnWidth);

  • Can we change the default tablespace of a table?

    Hi All,
    Can we change the default tablespace for any TABLE while it contains any data? If yes, how it works? If no, any workaround?
    Thanx,
    Zaaf

    instead of moving your table after the import you could:
    1)execute an import with the parameter ROWS = N
    2)move the empty tables to the correct tablespace
    3)execute an impot with ROWS = Y and IGNORE = Y
    This way you will only have to move empty tables which will probably be much faster also there is no need to rebuild the indexes.

  • How can i know the Column Position in a table

    Dear all
    How can i know the Column position in a table ..
    For example :-
    I have a table
    Desc EMPLOYEES
    Empid
    Ename
    Sal
    I want to know the Empid is in 1st position , ename is in 2nd position and sal is in 3rd position .
    is it possible ?

    Hi
    SELECT * FROM ALL_TAB_COLUMNS WHERE
    TABLE_NAME ='EMPLOYEES' AND owner=<OwNeR nAmE> ;)

  • How can i change the default width of the Narrow column for page layout?

    Would like to increase it?
    Aqualogic 6.1 MP1 or 6.5MP1...
    Thanks
    Sunil

    Not only can you set global values for each of the three columns, but you can also set unique column widths on a per community basis like this:
    .ptCommunity-1234 .columnOne { width: 635px; border-right:1px solid #CCCCCC; padding-top: 10px; padding-right: 20px; }
    .ptCommunity-1234 .columnTwo { width: 240px; padding-top: 10px; padding-left: 8px;}
    You can see here my community #1234 has a wide first column and a more narrow column two and even puts a little solid line between them.
    It's all in the stylesheets on your imageserver at the path I mentioned earlier. Again, look at the experience definition object in your admin portal and look at the stylesheet name in the dropbox. The stylesheet name you see is mapped to the .css file using the community-themes.txt file in the same ...yadayada/common/public/css folder on the imageserver.
    If you have, lets say, a mainstyle1-en.css that only has about a dozen lines dictating only the few items you mentioned before - then it has been stripped at one time because the default that comes w/ an original install is huge and a great starting point. It even has style tips and snippets in comment blocks to tutor you through its gargantuan variety of options.

  • How do you change the column widths in a master-detail input form?

    I have changed several columns to af:inputText so that the field contents can be modified, but this defaults the column width to a huge size, way past the size of the actual data field itself. Modifying the width attribute is ignored and dragging the column dividers is also ignored.
    How do I reduce the widths of these columns?
    Thanks

    Hi,
    maybe this blog entry "Referencing Maximum Length of an Attribute in an EL Expression" by Steve Muench helps
    http://radio.weblogs.com/0118231/2007/06/04.html#a839
    Frank

  • In Sales Order changing the column width to see all item desciption?

    When in the sales order screen .
    Expand the column width of say the item description.
    How do I save the column width for all the sales documents  for the field item description in sales order ?

    Hi,
    The column width of the Document will be defaulted to the same size at which the user has saved the last document.
    So, if a user has saved the Sales Order with a big column width for the 'Item Description' then after saving and re-entering into the Sales Order, the user can see the same column width for all the Sales Order's.
    I hope the above helps.
    Cheers~
    Jitin Chawla

  • How can I reduce the column width in a spreadsheet according to the text?

    Hi,
    I added a spreadsheet to a pages document and now I want to reduce the column width so that it fits the content (text).
    I tried it the other way around: I added very small columns and then chose the adjust-automatically-option in informations. This worked, the columns became broader and matched the text.
    Now I got a lot of spreadsheets which columns are too broad. When choosing adjust-automatically just nothing happens. What can I do?
    Sorry if this sounds a little weird, I'm using English seldom at time and don't know which words to choose to describe my problem properly. Hope someone can help me nevertheless?
    Sarah

    Hi Sarah,
    In Pages, the table Autosize feature pertains to Row Height, not Column Width. Numbers has more Table sizing options than Pages does, so you might want to consider looking into doing your work in Numbers.
    In Pages, there are slight differences in how tables behave depending on whether they are Inline or Floating. You might want to experiment with that. Long tables, however, must be Inline.
    Jerry

  • Can I change the Column Name without losing data and change the sequence

    Dear Experts,
    I want to change the column name without changing the sequence and dont want lose the data.

    Oracle Version : ?
    Example Based on 10g.
    SQL> conn scott/tiger
    Connected.
    SQL> create table col1 as select * from all_objects where rownum <= 100;
    Table created.
    SQL> alter table col1  add constraints col1_pk_objid primary key(object_id);
    Table altered.
    SQL> desc col1
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                 NOT NULL NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL> alter table col1 rename column object_id to object_no;
    Table altered.
    SQL> desc col1;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_NO                                 NOT NULL NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL> column column_name format a30
      1  select column_name,constraint_name
      2  from user_cons_columns
      3  where table_name = 'COL1'
      4* and owner = 'SCOTT'
    COLUMN_NAME                    CONSTRAINT_NAME
    OBJECT_NO                      COL1_PK_OBJID
    SQL>
    also go through
    http://www.dizwell.com/prod/node/65
    Message was edited by:
    user52

  • How can I change the background color of odd/even rows in a panelCollection

    Hi everyone.
    I'm using a panelCollection and I need to change the backgroung color for odd/even rows in the table,
    how can I do this, using a stylesheet, is there a special selector or property for this?
    globalResultCollection (UIPanelCollection object) , is a collection of UITable elements, and it's working fine.
    I just want to change the defaul background color for rows.
    Thanks
    <af:panelCollection id="GLOBAL_RESULT_COLLECTION"
    binding="#{admin.view.globalResultCollection}"
    styleClass="globalResultCollectionRegion"
    clientComponent="true">
    <f:facet name="menus">
    <af:menu id="GLOBAL_OPERATION_MENU"
    binding="#{admin.view.globalOperationMenu}" />
    </f:facet>
    <f:facet name="toolbar">
    <af:toolbar inlineStyle="width:100%"
    binding="#{admin.view.globalOperationToolbar}"
    id="OPERATION_TOOLBAR"/>
    </f:facet>
    </af:panelCollection>

    Hi,
    use this:
    af|table::data-row af|column::data-cell { background-color: #CCCCFF; }
    af|table::data-row af|column::banded-data-cell { background-color: #FFCCCC; }
    Regards,
    s o v i e t

  • How to change the column's position  in table?

    hye all,
    how can i change the position of column in the database
    for example:
    when i do query = "select column_name from all_tab_columns where table_name = upper('table_test')"
    this will be the column output - "columnA, columnB, columnC, columnD"
    but what i need is output like this : "columnD, columnA, columnB, columnC
    i think we have to change the position of the column in the database..so, how can i do that?
    thanks~

    hi
    Why dont you achieve it by using view
    SQL> CREATE TABLE a (col1  NUMBER,col2   NUMBER,col3   NUMBER);
    Table created.
    SQL> CREATE VIEW a_view AS SELECT col3,col2,col1 FROM a;
    View created.
    SQL> DESC a
    Name                            Null?    Type
    COL1                                     NUMBER
    COL2                                     NUMBER
    COL3                                     NUMBER
    SQL> DESC a_view
    Name                            Null?    Type
    COL3                                     NUMBER
    COL2                                     NUMBER
    COL1                                     NUMBER
    SQL> INSERT INTO a VALUES (1,2,3);
    1 row created.
    SQL> SELECT * FROM a;
         COL1      COL2      COL3
            1         2         3
    SQL> SELECT * FROM a_view;
         COL3      COL2      COL1
            3         2         1Khurram Siddiqui
    [email protected]

  • How do I change the border width of a table column?

    Hi I am using Studio Edition Version 11.1.1.3.0.
    I want to set the border width of columns inside an af:table to something different than the default still haven´t found a way to do this. I have tried setting Border Width property in Style tab of the column but it has no effect. I would apprciate if someone could tell me how to do this or point to some tutorial or blog where I can see how this is done.

    I tested it a little more and it seems like what I did is working on normal columns and the reason it isn´t working in my case is because I have two grouping columns (that is two columns containing other columns) and on those columns code like
    <af:column sortProperty="BillRef" sortable="true" headerText="#{bindings.Bill.hints.BillRef.label}"
    id="tblBillC1" width="85" inlineStyle="border-width:2.0px; border-color:Red;">
    has no effect for some reason.
    It is the group columns borders that I want to make a little wider so that it is easyer for the user of the table to see the where the table is split into groups.
    I will make an example to better descibe what I want to achieve.
    If you look at the code below and observe what is achieved when it is run you will see that the borders of the inner columns become green and 10px while the outer columns don´t get blue and 20px and it is the outer columns border that I want to change.
    <af:table >
    <af:column headerText="Sosial eyðmerking" id="sosCol" align="center"
    inlineStyle="border-color:Blue; border-width:20.0px;">
    <af:column sortProperty="something"
    headerText="something" id="c5"
    inlineStyle="border-color:Green; border-width:10.0px;">
    <af:outputText value="something" id="ot2"/>
    </af:column>
    <af:column headerText="#something" id="c7">
    <af:outputText value="something" id="ot3"/>
    </af:column>
    </af:column>
    <af:column headerText="Rokn eyðmerking" id="roknCol" align="center"
    inlineStyle="border-color:Blue; border-width:20.0px;">
    <af:column sortProperty="something"
    headerText="something" id="c8" filterable="true"
    inlineStyle="border-color:Green; border-width:10.0px;">
    <af:outputText value="something" id="ot4"/>
    </af:column>
    <af:column headerText="#something" id="c9">
    <af:outputText value="something" id="ot5"/>
    </af:column>
    </af:column>
    /af:table>

Maybe you are looking for

  • IF-statement in Personas that is checking if control is inactive?

    Hi, I have this simple script in screen personas that is clicking the option: "Attachment list". Everything is working great if there is attachments. If there are no attachments the option is "inactive" or "greyed out". This will result in a script e

  • Connection string to insert data to Oracle DB

    Hay guys, Now I am facing the problem to insert data to the oracle db. I already connect the db to my netbeans service tag & also found the db & tables. But does not know how to insert, delete etc from my JSF pages. I send my JSF code. You guys tell

  • Convergence 2.1 displaying image attachments - honoring Content-Disposition

    Is it reasonable to assume that when displaying a message from within Convergence 2.1 that images (jpg for example) should be displayed based on the Content-Disposition header value? That is to say that if Content-Disposition is "inline" that the ima

  • Several forecast models

    Hi, I need to see the result of several forecast models. how to do it ? Do I need to create n number of forecast profie to see the result of n number of forecast models or in one profile I can see the result of n number of forecast models. Thanks a l

  • Can't play music that I have bought

    I dont have the same username on my mac in OS X. Which leads to problem to deauthorize my itunes account. I can't play music that I buy, and free movies doesn't work either. I know this is the problem, cause I have tried to reformat using my old acco