How create grouped column in DataGrid ?

Hi all,
     I can create grouped column in AdvancedDataGrid. So in DataGrid, how I create grouped column ?
Thanks.

I have a problem that no anyone can help me to now. Sometime, I think that it's bug of ADG.
My goal same as from http://blogs.adobe.com/aharui/BlinkWhenChanged/dg.swf . But if I use ADG and with a scroll ! And when scroll up or down background color change not right.
It's a big problem ! Yep, when I use ADG, I can create group columns but ADG, I can't !
Is there any ways for me?

Similar Messages

  • Create grouped column headers dynamically

    Hi all,
    I want to create grouped column headers dynamically.
    DATA lr_table_column TYPE REF TO cl_wd_table_column.
    DATA lr_column_group TYPE REF TO cl_wd_table_column_group.
    DATA lr_caption TYPE REF TO cl_wd_caption.
    lr_table_column = cl_wd_table_column=>new_table_column( ).
    lr_table_column->set_table_cell_editor( lr_input ).
    lr_caption = cl_wd_caption=>new_caption( ).
    lr_caption->set_text( 'Min' ).
    lr_column_group = cl_wd_table_column_group=>NEW_TABLE_COLUMN_GROUP( ).
    lr_column_group->set_header( EXPORTING the_header = lr_caption ).
    CALL METHOD lr_column_group->add_column
            EXPORTING
              index      = 1
              the_column = lr_table_column.
           lr_table->ADD_GROUPED_COLUMN( EXPORTING the_grouped_column = lr_column_group ).
    But I don't understand how I can get the grouping of the columns.
    The following structure should be realized:
    FR  | Headline 1  |  Headline 2  |
    SR  | Min |  Max   |  Min |  Max   |
    FR = first row
    SR = second row
    regards
    Edited by: Wolfgang Bauer on May 19, 2010 7:52 AM

    LOOP AT it_comp_header INTO wa_comp_header.
    Minimum
          counter = counter + 1.
          CONDENSE counter.
          CONCATENATE 'INPUT_' counter INTO id.
         c_count = sy-index.
          c_count = counter.
          CONDENSE c_count.
          CONCATENATE 'IT_BIN_COMP.MIN' c_count INTO binding.
          cl_wd_input_field=>new_input_field(
            EXPORTING
               bind_value             = binding
               id                     = id
            RECEIVING
              control                = lr_input ).
          lr_column_group = cl_wd_table_column_group=>new_table_column_group( ).
          lr_table_column = cl_wd_table_column=>new_table_column( ).
          lr_table_column->set_table_cell_editor( lr_input ).
          lr_caption = cl_wd_caption=>new_caption( ).
          lr_caption->set_text( 'Min' ).
          lr_table_column->set_header( lr_caption ).
          lr_column_group->add_column( lr_table_column ).
          lr_table_column = cl_wd_table_column=>new_table_column( ).
          lr_table_column->set_table_cell_editor( lr_input ).
          lr_caption = cl_wd_caption=>new_caption( ).
          lr_caption->set_text( 'Max' ).
          lr_table_column->set_header( lr_caption ).
          lr_column_group->add_column( lr_table_column ).
          lr_table_column = cl_wd_table_column=>new_table_column( ).
          lr_table_column->set_table_cell_editor( lr_input ).
          lr_caption = cl_wd_caption=>new_caption( ).
          lr_caption->set_text( 'Sorting Bin' ).
          lr_table_column->set_header( lr_caption ).
          lr_column_group->add_column( lr_table_column ).
          lr_caption = cl_wd_caption=>new_caption( ).
          text = wa_comp_header-chip.
          lr_caption->set_text( text ).
          lr_column_group->set_header( lr_caption ).
          lr_table->add_grouped_column( lr_column_group ).
        ENDLOOP.
    Sub product
        lr_column_group = cl_wd_table_column_group=>new_table_column_group( ).
        lr_table_column = cl_wd_table_column=>new_table_column( ).
        lr_table_column->set_table_cell_editor( lr_input ).
        lr_caption = cl_wd_caption=>new_caption( ).
        lr_caption->set_text( 'Sub Product' ).
        lr_table_column->set_header( lr_caption ).
        lr_column_group->add_column( lr_table_column ).
        lr_table->add_grouped_column( lr_column_group ).
    Remarks
        lr_column_group = cl_wd_table_column_group=>new_table_column_group( ).
        lr_table_column = cl_wd_table_column=>new_table_column( ).
        lr_table_column->set_table_cell_editor( lr_input ).
        lr_caption = cl_wd_caption=>new_caption( ).
        lr_caption->set_text( 'Remarks' ).
        lr_table_column->set_header( lr_caption ).
        lr_column_group->add_column( lr_table_column ).
        lr_table->add_grouped_column( lr_column_group ).

  • How to hide column of DataGrid

    I am making a web part in which I am using System.Web.UI.WebControls.DataGrid control.
    It's AutoGenerateColumns property is set to TRUE.
    I am trying to hide a column at run time. I have written the following code on this controls ItemCreated event but it only works if I e.Item.Cells[0] and it doesn't work for any other value for e.g. e.Item.Cells[1] and e.Item.Cells[6].
    There are 9 columns in my DataGrid control.
    Code
    protected void grd1_ItemCreated(object sender, DataGridItemEventArgs e)
    { e.Item.Cells[0].Visible = false; //works fine
    e.Item.Cells[1].Visible = false; //gives error e.Item.Cells[2].Visible = false; //gives error
    Error
    Specified argument was out of the range of valid values.
    Parameter name: index
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    How to hide a particular column?

    Hi Frank,
    You can try something similar to the below in 'RowCreated' event Instead
    protected void gridView_RowCreated(object sender, GridViewRowEventArgs e)
    e.Row.Cells[1].visible =false;
    OR I would say hiding column is not something that is to be done at row level, so you can hide columns outside any of the grid view event after binding.
    e.g.
    gridview1.columns[1].visible=false;
    I am using DataGrid control in which there is no RowCreated event.
    I have tried second approach but it also doesn't work.

  • How Auto Fit column in DataGrid

    Is it possible to set autofit in DataGrid column ?
    Without auto fit the users must resize the table every
    time.

    Please Check this example
    http://www.flex4ex.com/?p=24

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • How to create table columns dynamically ?

    Hi All,
    I am working on an SSRS report that will show sales in the past 5 years. If the user selected to view sales of past 3 years he will only see 3 columns. so How can I create table columns dynamically at run time and how can I make sure that their dimensions
    will adjust to fit the report page size.

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • How to make a unbound datagrid (wpf) with custom columns

    I need to create a flex grid where I have to show different Items on a single cell (one or more button, some label). The number of item can change on different cells so is not possible to create a predefined data source. So I am looking how to setup
    a simple usecontrol that can accomodate the button and use this as column template.
    I have two question:
    1)how can I make the usercontrol able to grow up as the number of button increase and how can I make the datagrid row height "autosize" to accomodate the usercontrol and show all the content
    2) how can I add a empty row on the datagrid and access a single cell (and the usercontrol) to set and read its property.
    I've also tried to do this using a simple wpf grid but its miss many things (head and row fixed header, visible grid) 
    Thank you
    Alessandro
    alex

    I have done a part of the work
    I've generated a dataset with few row and set as itemsource to get the rows on the datagrid
    Then I have wrote a small usercontrol with a single button and a  public sub
    public sub set_text(text as string)
    me.button1.text=text
    end sub
    On the grid I've added the usercontrol as celltemplate
    <DataGridTemplateColumnHeader="Mycontrol1">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <local:UserControl1x:Name="controllo1"/>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    Then with this code I can call the set_text sub of a single control on a cell:
    Dimobj
    AsContentPresenter=
    griglia.Columns(2).GetCellContent(griglia.Items(1))
    DimmyDataTemplate = obj.ContentTemplate
    Dimtarget
    = CType(myDataTemplate.FindName("controllo1",
    obj), UserControl1)
     target.Set_text("text to show")
    All work fine till this point.
    I have 2 question:
    1)how can I handle events from my usercontrol (ex. user click a button?)
    2) how can I dinamically add column using the prevous template? Is possible to manipulate direclty the xaml or the only way is to use
    griglia.Columns.Add() ...
    Thank you.
    alex

  • How can I show groupped columns inisde Diadem report ?

    Hi,
    I am trying to show some values inside a Diadem report. I must show then in a similar way as "groupped columns" inside Excel, comparing different values in columns, just one columns next to the other one, but I do not know how I can manage it inside Diadem. With "bar" and outlined bars, all the columns are located at the same X point, so it is not the same as in Excel. How could I compare values of differet columns?
    Thanks for your collaboration

    Hi koniker,
    Do you mean Y offset? If so, you can do it, but it's not a built-in feature, so again, you would have to shift the Y values up or down by Delta with the FormulaCalculator prior to graphing.
    Normally multiple values occurring at the same X axis point are displayed either as lines and/or symbols. Bar graphs come up occasionally in DIAdem, but they're much more important for business graphing needs, thus the strong support of them in Excel.
    What's your use-case? Are bar graphs the only acceptable choice? I can create and send you VBScript code to shift the bars either in the X direction or the Y direction, as you wish, if that's the optimal diplay. It just won't be a built-in feature.
    Regards,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How do I create multiple columns with bullets in pages

    I'm trying to figure out how to create multiple columns within a document in which I bullet information...

    At the point you wish to change to two columns, Insert > Columns and then in the Layout Inspector, select the number of columns. After the insertion point, you will also need to insert another Column Change to return the following paragraphs to single column.
    Then Select the text to be bulleted and in the Text Inspector > List tab select the type of bullets.
    Note: This creates two columns that flow together. This can be tricky if you add any text later.
    If you wish to ensure alignment, create a two column text table and remove the lines with the Graphic Inspector > Lines > No Lines option and insert your text in each column and apply the bullets as above.
    This will create a text box - you then need to ensure it moves with the text by electing "Object Moves With Text" in the Wrpa Inspector.
    Message was edited by: bwfromspring hill

  • At max how many logical columns can be created in RPD

    Hi All,
    At max how many logical columns can be created in RPD. I have a requirement of creating 200 columns. Will there be any problem .
    Is there any predefind number of columns for RPD creation??
    Please help ..

    Hi Annapurna,
    There's no limit that I'm aware of or which is mentioned anywhere. Just as an example: I have a logical fact table with around 750 logical columns (>500 original measures & 250 derived measures). No issue whatsoever. Opening the presentation table through answers takes about 2-3 seconds (the NQSQL command has a lot to retrieve), but that's about it.
    Cheers,
    C.

  • How can I create a column to numerically order all the items?

    As a first time user of Numbers, I created a table of info which I imported from Address book.
    Everything looks good.
    I would like to be able to see how many addresses I have on the table.
    I looked at the Numbers 08 manual, and went to Preferences, then Auto correction, then -automatically detect lists.
    The manual says to choose something on Table Inspector- but I couldn't find it.
    I did choose - have Press Return to automatically move to next cell.
    I created a column before the first column on my table ( which was last name) and typed 1.
    I thought that when I pressed return it would automatically type in 2 and 3 and so on.
    But I guess I missed a step.
    Any suggestion?

    Hi Rosie,
    It's not clear whether you want to Number the names or Count the names. I'll give you the solution for each.
    To number the entries, begin as you have done, typing a "1" in the first cell, and hitting Return. Then type a "2" in the second cell. Now select both cells and grab the little circle in the lower right corner of the selection rectangle, pulling it down to continue the sequence that you have begun typing.
    To count the number of entries without numbing them, here is one pretty easy way...
    Click on the column label over the last names, which will select the entire column. Then click on the Function Icon on the Toolbar and select Count. This will insert a Footer Row in your Table, and will display the number "0". The zero count is because you have no numbers values in the column. To edit the function to display the count of text items, Names, we need to edit the Function from COUNT to COUNTA. Just click on the footer cell to select it, then click in the Formula Bar, just above the Column Labels, and place your text cursor behind the "T" in COUNT and type an "A". Then hit Return. Now your new footer cell will show your count of names.
    Post back if you have questions.
    Jerry

  • How do you create a column of sequenced dates in Numbers

    How do you create a column of sequenced dates in Numbers without typing in each date? For example: 01/05/15, 01/12/15, 01/19/15, 01/26/15, 02/02/15, etc.

    Hi Cha Ling,
    Another way,
    Enter your first two dates that show the desired interval- i.e. 01/05/15 and 01/12/15.
    Select both cells and choose fill from the contextual menu.
    Drag down to fill your column.
    quinn

  • How to validate a whole column of DataGrid

    I want to validate a whole column of DataGrid using
    Validator.
    How to do that?

    Thanks. It works! Prima!
    It's a little bit difficult for me to write and understand the English terms correctly, cause I am German.
    I did not recognize, that I had to go to the Library Module!
    Here I repeat Rikk's way in German:
    Im Bibliothek-Modul
    Rasteransicht
    Bilder selektieren
    Im Menufeld Ad-hoc Entwicklung:
    Freistellungsfaktor einstellen: 16:9

  • How to create dynamics columns in oracle query1.

    hi,
    how to create dynamics columns in oracle query.its very urgent.
    regards
    prasad..

    Urgent is it?
    Why? Have you forgotten to do your coursework and you'll get thrown off your course if you don't hand it in today?
    What makes you believe that your request for help is more important than someone else who has requested help? It's very rude to assume you are more important than somebody else, and I'm sure they would like an answer to their issue as soon as they can get one too, but they've generally been polite and not demanded that it is urgent.
    Also, you assume that people giving answers are all sitting here just waiting to answer your question for you. That's not so. We're all volunteers with our own jobs to do. How dare you presume to demand our attention with urgency.
    If you want help and you want it answering quickly you simply just put your issue forward and provide as much valuable information as possible.
    Looking at your post you haven't told us what database version you are using, you haven't provided any create table DDL's and insert statements to populate that with sample data, and you haven't even shown us that you've had a go at doing something yourself.
    You will find if you post on here demanding your post is urgent then most people will just ignore it, some will tell you to get lost, and some will explain to you why you shouldn't post "urgent" requests. Occasionally you may find somebody who's got nothing better to do who will actually provide you with an answer, but you really are limiting your options by not asking properly.
    /rant
    As a basic example of dyanamic SQL:
    DECLARE
      cur PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
      cols DBMS_SQL.DESC_TAB;
      ncols PLS_INTEGER;
    BEGIN
      -- Parse the query.
      DBMS_SQL.PARSE(cur, 'SELECT hiredate, sal FROM emp', DBMS_SQL.NATIVE);
      -- Retrieve column information
      DBMS_SQL.DESCRIBE_COLUMNS (cur, ncols, cols);
      -- Display each of the column names
      FOR colind IN 1 .. ncols
      LOOP
        DBMS_OUTPUT.PUT_LINE (cols.col_name);
      END LOOP;
      DBMS_SQL.CLOSE_CURSOR (cur);
    END;
    /

  • How to create a column where each subsequent entry is added to the former?

    How does one create a column, inside Numbers, where each subsequent cell is added, in value, to the preceding cell above it? For example, a column could be labeled "credit card subtotals for the month." In the first cell, one might insert a dollar value, eg., $24.00. The next credit card charge might be $100.00 and that would be added to the $24.00 to create a running subtotal.
    Thank you.

    Hi Jay,
    Both formulas are written as they would appear entered into C2.
    The 'special formula' is also written as it would appear in C2. Where I have used 'formula for C2' substitute your choice of the two formulas listed above the 'special formula' in my earlier post.
    If you choose to use the first version, the finished 'special formula' will look like this in C2:
    =IF(LEN(B2)>0,SUM(C1,B2),"")
    Jerry's remarks regarding using conditional formatting to suppress the display of zeroes is well taken, but in this case, will not work as there are no zero values to be hidden.
    In this case, either of the initial formulas will repeat the last 'running balance' in every cell from the last row containing an entry in column B to the bottom row of the table.
    The formula checks, by counting the number of characters displayed, whether an entry has been made in the column B cell on the same row as the formula (B2 in the example in this post. IF an entry has been made, the formula calculates the sum of that entry and the previous running balance. IF no entry has been made (ie. there are no chanracters displayed in B2, the calculation is skipped, and the empty string ( "" ) is placed in C2, giving the appearance of a blank cell.
    Example:  the formula in this post is used in column C. Column D uses the core of that formula (with the C1 reference replaced by D1) without the IF statement. Both formulas are filed down to the bottom cell in their columns. Note the difference in rows 7 and below:
    Regards,
    Barry

Maybe you are looking for

  • Huge increase over past few months on data usage.

    Huge increase in data traffic, even at times when systems are in sleep mode - like at 6am in the morning.  For months by usage levels varied between 10Gig and 12 Gig and I would adjust my plan as needed to prevent single Gigabyte overcharges.  Howeve

  • Ipod classic 160 using 30GB laptop

    Is there a way to import my extensive cd collection (at least 160GB worth) to my ipod classic 160 using a laptop that has only 30GB? Can I somehow use my 1TB external drive to help get all the music onto my ipod? So far everything I import to itunes

  • BAPI_PO_CREATE1 - help loading item condition !!

    Guys, I am having problem loading BAPI_PO_CREAT1 Structure - POCOND. I am currently using the following values for the BAPI structure : POCOND-COND_VALUE = '20'  " NET PRICE POCOND-COND_TYPE = 'ZP11' " Custom value type POCOND-CURRENCY = 'USD' POCOND

  • Stolen MacBook Pro 15'

    My MacBook Pro was stolen out of my car in Nairobi. I am trying to list the stolen serial as many places as possible in hopes of recovery through a tip or through an honest person that might buy it. If it isn't wiped I would even be willing to buy it

  • Creator and Factory

    Hello! I am not sure if i have understood the Grasp creator pattern right. I made a C++ program in school before. Some of the classes were supposed to have a method called create that created an object of its own class and returned it. Is it that met