Hiding Column in Data Grid

Is there is way to hide a column in data grid column?
Is it possiblo to reorder the column like in excel . I know its not possible bcoz it <table> tag ...

Select the column within the table and in the property window uncheck the visible. You can also include visible="false" in the jsp page within the column tag.

Similar Messages

  • Hiding columns in ALV Grid output

    Hi all,
    Please find below my piece of code. I want to hide couple of columns in the grid output. Could you please tell me how to achieve it.
      DATA: gr_alv        TYPE REF TO cl_salv_table,
            lr_display    TYPE REF TO cl_salv_display_settings,
            lr_columns    TYPE REF TO cl_salv_columns_table,
            lr_column     TYPE REF TO cl_salv_column_table,
            lr_functions  TYPE REF TO cl_salv_functions_list,
            lr_sorts      TYPE REF TO cl_salv_sorts,
            lr_print      TYPE REF TO cl_salv_print,
            lr_column_f   TYPE REF TO cl_salv_columns,
            gr_error      TYPE REF TO cx_salv_not_found ,
            lr_event      TYPE REF TO cl_salv_events_table,
            lr_handler    TYPE REF TO znew_gc_event_handler,
            lr_layout     TYPE REF TO cl_salv_layout.
      DATA: key     TYPE salv_s_layout_key,
            gr_msg  TYPE string.
      TRY.
    * Create ALV instance - use CALL METHOD since this is a static method
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = gr_alv
            CHANGING
              t_table      = lt_to_header.
          lr_display = gr_alv->get_display_settings( ).
          lr_display->set_list_header( text-ttl ).
    * Get functions object and then set all the functions to be allowed
          lr_functions = gr_alv->get_functions( ).
          lr_functions->set_all( ).
          DATA: lv_field TYPE lvc_fname.
    * Get column settings object and then optimize the column widths to the
    * data
          lr_columns = gr_alv->get_columns( ).
          lr_columns->set_optimize( ).
    *--- set column header for custom field Todays Date
          TRY.
              lr_column ?= lr_columns->get_column( 'ZZDATE' ).
              lr_column->set_output_length('12').
              lr_column->set_long_text( 'Todays Date' ).
            CATCH cx_salv_not_found INTO gr_error.
              gr_msg = gr_error->get_text( ).
              MESSAGE gr_msg TYPE 'I'.
          ENDTRY.
    *--- set column header for custom field Age of Open
          TRY.
              lr_column ?= lr_columns->get_column( 'ZZ_AGE_OF_OPEN' ).
              lr_column->set_output_length('12').
              lr_column->set_long_text( 'Age of Open' ).
            CATCH cx_salv_not_found INTO gr_error.
              gr_msg = gr_error->get_text( ).
              MESSAGE gr_msg TYPE 'I'.
          ENDTRY.
    *--- set column header for custom field Age when Confirmed
          TRY.
              lr_column ?= lr_columns->get_column( 'ZZ_AGE_CONFIRMED' ).
              lr_column->set_output_length('18').
              lr_column->set_long_text( 'Age when Confirmed' ).
            CATCH cx_salv_not_found INTO gr_error.
              gr_msg = gr_error->get_text( ).
              MESSAGE gr_msg TYPE 'I'.
          ENDTRY.
          lr_event = gr_alv->get_event( ).
          CREATE OBJECT lr_handler.
          SET HANDLER: lr_handler->on_double_click FOR lr_event.
    *... Set Sort
          lr_sorts = gr_alv->get_sorts( ).
    *        " Optimize the column widths for printing.
          lr_print = gr_alv->get_print( ).
          lr_print->set_print_parameters_enabled( value = 'X' ).
          lr_print->set_column_optimization( value = 'X' ).
    *--- This code is to get the layout,save the layout and display the
    *    layout
          lr_layout = gr_alv->get_layout( ).
          key-report = sy-repid.
          lr_layout->set_key( key ).
          lr_layout->set_save_restriction( cl_salv_layout=>restrict_none )
          DATA: init_layout TYPE slis_vari.
          init_layout = p_layout.
          lr_layout->set_initial_layout( init_layout ).
    *--- display report
          gr_alv->display( ).
        CATCH cx_salv_msg.
          WRITE: 'Error displaying grid! - cx_salv_msg'.
        CATCH cx_salv_not_found.
          WRITE: 'Error displaying grid! - cx_salv_not_found'.
        CATCH cx_salv_data_error.
          WRITE: 'Error displaying grid! - cx_salv_data_error'.
        CATCH cx_salv_existing.
          WRITE: 'Error displaying grid! - cx_salv_existing'.
      ENDTRY.
    Thanks,
    Salil

    HI
    THIS IS THE LOGIC
    SELECTION-SCREEN BEGIN OF BLOCK charly
                     WITH FRAME TITLE text-100.
    PARAMETERS: rb_dis RADIOBUTTON GROUP rb DEFAULT 'X'
                                      USER-COMMAND ucomm ,
                rb_hid RADIOBUTTON GROUP rb .
               P_DEL TYPE VBAK-VKGRP .
    SELECTION-SCREEN END   OF BLOCK charly.
    *SELECTION sCREEN FOR PO TABLE
    SELECTION-SCREEN BEGIN OF BLOCK b2
                     WITH FRAME TITLE v_text.
    SELECT-OPTIONS : s_xblnr  FOR  zmshub-xblnr MODIF ID gr2,
                     s_bstkd   FOR  zmshub-bstkd MODIF ID gr2,
                     s_posex   FOR  zmshub-posex_e MODIF ID gr2,
                     s_kdmat  FOR  zmshub-kdmat MODIF ID gr2.
    PARAMETERS : p_upload LIKE ibipparms-path LENGTH 90  MODIF ID gr3 ,
                 p_down LIKE ibipparms-path  DEFAULT 'C:\output_log.txt'
                                           MODIF ID gr3.
    SELECTION-SCREEN END OF BLOCK b2.
    *SELECTION sCREEN FOR  DOWNLOADING
    SELECTION-SCREEN BEGIN OF BLOCK b4
                     WITH FRAME TITLE text-105.
    PARAMETERS :
              rb_n_d_f  RADIOBUTTON GROUP rb1 DEFAULT 'X' ,
              rb_ftp   RADIOBUTTON GROUP rb1 ,
              p_f_n TYPE c LENGTH 25 DEFAULT 'FILE NAME .TXT',
              rb_ws_d  RADIOBUTTON GROUP rb1 ,
              p_dw_f_n TYPE c LENGTH 25 DEFAULT 'C:
    TEMP\FILE.TXT',
              rb_op_ds RADIOBUTTON GROUP rb1 ,
              p_log_p LIKE filename-pathintern  DEFAULT 'ZHKWEB01',
              p_pa_fn LIKE rlgrap-filename MODIF ID gr1
                     DEFAULT  '//SOME-DIR/FILE.TXT',
              rb_ob_dw    RADIOBUTTON GROUP rb1,
             p_file LIKE filename-pathintern   "logical path
                        DEFAULT 'ZHKWEB01',       "name
             p_fname LIKE rlgrap-filename MODIF ID gr1     "path &
    *filename
                     DEFAULT text-t02,             "/some-dir/file.txt
              p_f_name TYPE c LENGTH 25 DEFAULT
    SOME-SERVERNAME\SOME-DIR\SOME-FILE.TXT'.
    SELECTION-SCREEN END OF BLOCK b4.
    AT SELECTION-SCREEN OUTPUT.
      IF NOT rb_dis IS INITIAL.
        LOOP AT SCREEN.
          IF screen-group1 = 'GR3'.
            screen-invisible = 1.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'GR2'.
            screen-invisible = 0.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

  • Add Total for a Column in Data Grid Screen Based on Query

    Hi Guys , I have query based on table Payments in which I search By Start Date , End Date  and tenant person [ from drop down List ].
    How to display sum of Payments.[Amount] column in the query screen , which off-course varies for selected person.
    Omar 

    The data grid doesn't support calculating aggregate functions on columns automatically, but you can write a little bit of code to show the total of the payments right beneath the data grid.
    Add a screen member called PaymentsTotal that is the same type as the column that you want to sum.
    Drag out the screen member to be underneath the data grid. You can change the sizing settings (e.g. Horizontal Alignment) so that it aligns with the data grid how you want it.
    Select the Payments collection and select Payments_Changed from the Write Code drop down.
    In the generated method, write the following code:
    partial void Payments_Changed(NotifyCollectionChangedEventArgs e)
    // Total is the name of the property in my Payment entity that I want to sum
    this.PaymentsTotal = this.Payments.Sum(p => p.Total);
    When you run the screen, the PaymentsTotal property will show the total of all of the payments that are shown in the data grid.
    Justin Anderson, LightSwitch Development Team

  • Data Grid Display child Class data

    Hi,
       I have  2 Action Script class binded to remote java class
    Class 1
    package hmil.setup.model
    import hmil.com.general.model.Employee;
    [Bindable]
    [RemoteClass(alias="hmil.setup.model.Area")]
    public class Area
    public function Area()
    public var ARMST_AREA_ID:int;
    public var ARMST_CMPN_NO:String;
    public var ARMST_CORP_NO:String;
    public var ARMST_SCTN_TYPE:String;
    public var ARMST_CRTE_USR_NO:String;
    public var ARMST_CRTE_TIME:Date;
    public var ARMST_UPDT_USR_NO:String
    public var ARMST_UPDT_TIME:Date;
    public var ARMST_DLR_LIST:ArrayCollection;
    public var ARMST_EMP:Employee;
    Class 2
    package hmil.com.general.model
    [Bindable]
    [RemoteClass(alias="hmil.com.general.model.Employee")]
    public class Employee
    public function Employee()
    public var EPMST_ID:Number;
    public var EPMST_CMPN_NO:String;
    public var EPMST_CORP_NO:String;
    public var EPMST_EMP_NO:String;
    public var EPMST_DLR_NO:String;
    public var EPMST_EMP_NAME:String;
    When the remote java method returns  a list of Area object through Blaze DS  this list can be assiged as data to the Data Grid
    The DataGridColumn   dataField can be mapped to the column name and it displays properly
    <mx:DataGridColumn  dataField="ARMST_AREA_ID" headerText="Id"/>
    But lets say I wanted to display the child value  (ARMST_EMP.EPMST_ID )   in the Data Grid 
    Since the sever returns the Parent Java Object  which contains the related Employee as inner Object.
    The Objetcs are deserialized to AS class objects.
    But how to display the  child columns in data grid.
    If i give the data field as ARMST_EMP  it is displayed as Object. but if i mention the datafield as ARMST_EMP.EPMST_ID, it does not display anything.
    please  let me know how to display the child object in datagrid
    Thanks

    Hi Mugunda, did you ever find out how to do this?

  • Data grid error on S9 FM

    when I adjust the width of the columns of data grid i got below web page error:
    Line:80
    Char:1
    Error:Invalid arguments
    Code:0
    And the webpage went to turmoil.

    There is no error when i use FireFox to access HFM web.

  • Data grid within advanced data grid (Hiding and showing columns)

    Hi,
    I have a dta grid within advanced datagrid. When the row of advanced data grid is expanded, the datagrid opens up.
    I want to control the columns of datagrid based on the value of a field in advanced data grid. I want to show all the columns of the datagrid if the field value of advanced data grid is "X" else I want to show only few columns of the data grid.
    I will set the id for all the columns of the datagrid. Then I think I can write some code in a method to set the visibility of the columns and assign the function to item opening property of the advanced data grid.
    Please give me some ideas.
    Regards,
    Mahee   

    Hi,
    Please go through following links:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=553
    http://flexmusings.wordpress.com/2009/08/03/hide-row-column-datagrid/
    http://www.java2s.com/Code/Flex/Grid/HidinganddisplayingDataGridcolumns.htm
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Hot to use the data grid to edit column objects

    I have a simple object type:
    CREATE OR REPLACE TYPE TIMESLICE AS OBJECT
    SINCE TIMESTAMP (6),
    UNTIL TIMESTAMP (6)
    And a simple table with one column containing objects of this type:
    CREATE TABLE TABLE1
    COLUMN1 TIMESLICE
    I can insert into the table:
    INSERT INTO SLICES VALUES (timeslice (NULL, NULL));
    But when I try to use the data grid and write there the same string "timeslice (NULL, NULL)" as value I get the following error during commit:
    One error saving changes to table "TABLE1":
    Row 1: ORA-06550: line 1, column 55:
    PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got CHAR
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    The data grid interprets the value as characters instead of an expression.
    How do I have to enter the object in the data grid?

    Is it possible to access the cache datasource inside the script component which is available in the same data flow task??
    Thanks in advance,
    Saravanan

  • How to save xml and xsl function to a data grid column

    hi. wondering, i have a xml and a xsl file, and have the transform class, and so need to save the xml and the xsl file, and display the results on a particular data grid column and to loop through the data grid columns. so, how do i use the xml save function
    class, any examples or point me to articles, where i can read how to do this. need to display a file, with a different colour and font. any ideas. thanks. marvin.hi. need to save a xml and xsl file and display the results on data grid. how do i do this. any
    sample code or articles i can read about thanks. marvin.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    
    Hi.
    Okay, well, did ask on the msdn forums, and some one replied, and so, will paste the code he suggested.
    But getting a lot of errors.
    Can you help me out.
    Where am I going wrong.
    So, I can then get this to work, then it shows the colours and the fonts on the specified data grid.
    Can you help.
    Want to get this working and passed today if possible.
    Will pasate the code and the errors below.
    Can you help.
    Where am I going wrong.
    Marvin.
    // Set up the data set.
    DataSet ds =
    new
    DataSet();
    // Set up the data table.
    DataTable dt =
    new
    DataTable();
    // Ad the data table to the data set.
        ds.Tables.Add(dt);
    // Write the xml document to the data grid column.
        ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
        ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
        ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
        ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
    // Set up the data table and the data set and set to 0.
        dgvDisplayData.DataSource = ds.Tables[0];
    Error      1              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                215        
    18           WoodStocks
    Error      2              Invalid token ')' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                215        
    21           WoodStocks
    Error      3              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                219        
    16           WoodStocks
    Error      4              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                221        
    16           WoodStocks
    Error      5              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                222        
    15           WoodStocks
    Error      6              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                223        
    15           WoodStocks
    Error      7              Invalid token '=' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    31           WoodStocks
    Error      8              Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    43           WoodStocks
    Error      9              Invalid token ';' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    45           WoodStocks
    Can you help me out.
    Thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

  • Column formatting based on grouping data value- advanced data grid

    Hello Everyone,
    I am using advanced data grid to display hierarchial data nested upto depth 4. I have to color the leaf nodes conditionally based on  the grouped column value.
    Say for Eg.,
    If the data is something like
    Company
         Manager
              Jim          $4000
              John        $3000
         Accountant
              Smith     $2000
              Sam       $3000
    I have to color Jim and John based on they being a manager. In other words, how do I get Manager and Company information for the leaf rows. The data is serial to start with and I am grouping it before displaying.
    Please let me know how this could be done.
    Thanks
    Arun

    Once htmldb.oracle.com is available again, you may have a look in my demo application:
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    In the tab section I, you will find several examples on pop-up pages. There this conditional
    displaying is included as well.
    Denes Kubicek

  • Rows and column limit on Data Grids

    Hello,
    anyone know if there's a limit for the number of rows and columns per page in the Data Grids?
    Thanks in advance

    There is not a limit. There is a default of 1024 rows, but you can change this.
    -- Chris

  • Advanced Data Grid Column Grouping

    When using column grouping with the advanced data grid, is it
    possible to ONLY show the AdvancedDataGridColumnGroup headerText
    and not have the extra row for the AdvancedDataGridColumn
    headerText? For instance, if a have a set of 3 columns with a
    spanned group headerText of "manage", and the columns have buttons
    with the text "edit", "move" and "delete", can I just omit the
    secondary headings since the "edit|move|delete" text is there on
    the buttons and redundant as a column heading?

    When using column grouping with the advanced data grid, is it
    possible to ONLY show the AdvancedDataGridColumnGroup headerText
    and not have the extra row for the AdvancedDataGridColumn
    headerText? For instance, if a have a set of 3 columns with a
    spanned group headerText of "manage", and the columns have buttons
    with the text "edit", "move" and "delete", can I just omit the
    secondary headings since the "edit|move|delete" text is there on
    the buttons and redundant as a column heading?

  • Hiding the columns in data table in jsf

    Hi Guys,
    I have stuck one situation in my project . i.e i want to hide the columns in Data table in jsf.
    Please response this mail.
    Thanks
    Narne

    See this...
    [http://forum.java.sun.com/thread.jspa?threadID=5119514&messageID=9938606]

  • Flex 4 Data Grid Title chromecolor - can it be changed per column?

    Is there a property or style that can change the color of a data grid's title chromcolor?  Much like the chromecolor of a title window?
    Thanks.

    Hi,
    Are you referring to the GridColumnHeaderGroup (DataGrid's header bar)? If so, you can use the "color" style on GridColumnHeaderGroup to change the header renderers' text color. Otherwise, you can create your own header renderer for the GridColumnHeaderGroup and set it to the "headerRenderer" property of the GridColumnHeaderGroup in the DataGrid's skin.
    -Kevin

  • BUG in data grid and run script (V1 1467)

    Hi,
    I found a weird bug in data grid when displaying data defined as NUMBER(10,0).
    We have a table with a column defined as NUMBER(10,0). Whenever this column contains data >5000000000 the data in the row shows up as null (empty cell) in the data grid.
    I played around a bit and found that running a scrip like select * from testtab where a > 5000000000; with F5 it stops at the first number >5000000000. Running the script with F9 shows all rows correct.
    I'm running on WIN2000 using SQL Developer V1 (Build 1467).
    The error was not present in Build 1422.

    I tried the SQL you supplied (by the way, the table name helps in the INSERT statement) and then went to the DATA tab to view the data.
    Interesting results.
    Even though all of the insert statements executed successfully, only 2 of the rows had any data displaying in columns A and C. All rows had data in column B.
    Now for the real fun: by selecting one of the empty cells the "missing" data would appear. Try a commit (yeah, I know nothing has been updated, but SQL Developer doesn't know this) and check out the UPDATE statements that are generated in the log. The cells I selected are being updated with the "missing" data. Refresh the display and the data goes into hiding again.
    I don't even want to get into the dangers of a tool updating data when all you've done is to get focus on a field. I've already seen it wipe out the time portion of date/time stamps simply because the default setting for the date/time format does not include the time.
    Good start on a tool guys, but it's not quite ready for Prime Time.
    BTW...I'm using Oracle 9.i running SQL Developer on Windows 2000.

  • Display value in data grid

    08/29/2008 08:58:48 AM
    Reply | Quote | Top | Bottom | Edit
    hi all,
    i have two classes.
    class User
    public String name;
    public int age;
    public Address address;
    class Address
    public String city;
    I'm passing a List<Users> to the data provider of a
    data grid . I can display the values of properties of Users i.e,
    name and age.. My issue is how do i display the value of city which
    is a propertyt of Address class in the datagrid column..
    thanx in advance
    Mark this message as the answer.
    Print this message
    Report this to a Moderator

    Hi,
    Try labelFunction property of the DataGridColumn.
    labelFunction allow you to specify a function name, which will be
    invoked when that data is rendered. You will get the Object (User
    id your case) corresponding the row being rendered will be passed
    as argument to the function. You can use the object and return the
    value you want to be displayed.
    Please find more details on labelFunction at the URL below
    http://livedocs.adobe.com/flex/3/langref/mx/controls/dataGridClasses/DataGridColumn.html#l abelFunction
    You can also try custom item renderer.
    Hope this helps.

Maybe you are looking for

  • Transport to Consolidation system doesn't work

    First of all, sorry if this is a silly question but I have to admin I am a little missed with NWDI. Every step we did we have a new error In this case, we have trying to move a iView using NWDI and process to transport from Development Environment to

  • All my photos have downloaded to my desktop how to get them off there

    over 1200 photos have downloaded to my desktop how do I get them off there. i have tried everything I could think of to get them off. I saw a posting for that but it kept referring to the last five lines of 82820's last post which i could not find th

  • Htc one m8

    my phone keeps puk locking itself, powering off/on, and resetting itself randomly. have tried over 15 sim cards, 4 new phones and gmail accounts. called verizon multiple times and htc twice. htc won't help they say it is verizons problem. verizon cla

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There, How to use TRUNC function with dates in Expression Builder in OBIEE. TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column. Thanks in

  • How to insert delay without using loops, and how can I use variable to store data in labview

    Hi all, I am new to Labview and I realized that quite often I am in condition to require a delay beween two functions or elements.. how can we insert a delay in such cases? I know how to use delays in a loop. but don't know how to inser some time del