Set DataGridColumn editable based on row data

I searched for this but did not find a direct answer. People wanted something similar but not exactly the same.
I have several columns in a standard datagrid that I would like to set editable if the data.company_id > 0. Is this possible? Here's my MXML code:
<mx:DataGridColumn headerText="Part Number"
                   dataField="part_number"
                   editable="false"
                   itemRenderer="controls.setTextColor"/>
I tried:
<mx:DataGridColumn headerText="Part Number"
                    dataField="part_number"
                    editable="{data.company_id > 0 ? true : false;}"
                    itemRenderer="controls.setTextColor"/>
But of course that would be too easy, right?
Help greatly appreciated...
Rick

But of course that would be too easy, right?
aha, you're in luck
Very quick and rough, but it works like a charm
XML (written from php)
<?php
     echo
     <thing>
          <edit>true</edit>
          <value>10</value>
     </thing>
     <thing>
          <edit>false</edit>
          <value>1000</value>
     </thing>
     <thing>
          <edit>false</edit>
          <value>550</value>
     </thing>
     <thing>
          <edit>true</edit>
          <value>20</value>
     </thing>
?>
Flex
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="stuff.send()">
    <mx:HTTPService id="stuff" showBusyCursor="true" method="POST" url="http://localhost/stuff.php"/>
    <mx:DataGrid id="blah" x="240" y="93" dataProvider="{stuff.lastResult.thing}" editable="{blah.selectedItem.edit}">
        <mx:columns>
            <mx:DataGridColumn dataField="value" editable="{data.edit}"/>
        </mx:columns>
    </mx:DataGrid>
</mx:Application>
so yeah, i'd assume you'd have to edit the actually datagrid editable properties, rather than just the datagrid column. If your function doesn't work in there then just feed it a direct boolean value like i did.

Similar Messages

  • ALV Grid OO : Set Field editable for  selected rows

    Hello ABAPers,
    I used object  cl_gui_alv_grid to created ALV grid and i succed to set an editable
    field for all rows. However my request is to set it for and only for selected rows
    I could get the row index but i didn't know how to use it
    Thanks in advance
    Amine

    Hi Amine,
    I think the standard SAP sample program might help you, BCALV_EDIT_02.
    I will tell the procedure to make the selected rows editable on ALV.
    1. Add a additional field of type LVC_T_STYL in the internal table that you are displaying in the ALV. LVC_T_STYL is a actually a table type.
    2. Place a button on the ALV toolbar for EDIT/DISPLAY.
    3. Once you press the EDIT button after selecting the rows, loop through the records which you have selected (you have already said that you have the index of selected records).
    4. The table type LVC_T_STYL has fields for FIELDNAME and STYLE.
       If you have 10 fields in the internal table, then all these ten fields name should be appended to the newly added field in the internal table (LVC_T_STYL) and their style should be populated with value cl_gui_alv_grid=>mc_style_enabled.
    Regards,
    Rahul MB

  • Group based on row data

    Given the following data:
    id duration start date end date
    1 15 08/01/2008 10:00 08/01/2008 10:15
    2 15 08/01/2008 10:15 08/01/2008 10:30
    3 15 08/01/2008 10:30 08/01/2008 10:45
    4 15 08/01/2008 11:00 08/01/2008 11:15
    5 15 08/01/2008 11:30 08/01/2008 11:45
    6 15 08/01/2008 11:45 08/01/2008 12:00
    7 15 08/01/2008 12:00 08/01/2008 12:15
    Is it possible to group them based on the sum of the duration column? If three rows' duration sum equals 45 and the datetimes are contiguous, then they'll be grouped as 1. So in the example above, [1 2 3] will be grouped as one and [5 6 7] will be grouped as another - row 4 is excluded since row 4 and row 5 aren't contiguous.
    Thanks.

    How about:
    SQL> alter session set nls_date_format = 'mm/dd/yyyy hh24:mi'
      2  /
    Session altered.
    SQL> with t1 as (
      2              select 1 id,15 duration,to_date('08/01/2008 10:00') start_date,to_date('08/01/2008 10:15') end_date from dual union all
      3              select 2, 15, to_date('08/01/2008 10:15'), to_date('08/01/2008 10:30') from dual union all
      4              select 3, 15, to_date('08/01/2008 10:30'), to_date('08/01/2008 10:45') from dual union all
      5              select 4, 15, to_date('08/01/2008 11:00'), to_date('08/01/2008 11:15') from dual union all
      6              select 5, 15, to_date('08/01/2008 11:30'), to_date('08/01/2008 11:45') from dual union all
      7              select 6, 15, to_date('08/01/2008 11:45'), to_date('08/01/2008 12:00') from dual union all
      8              select 7, 15, to_date('08/01/2008 12:00'), to_date('08/01/2008 12:15') from dual union all
      9              select 8, 45, to_date('08/01/2008 13:00'), to_date('08/01/2008 13:45') from dual union all
    10              select 11, 15, to_date('09/02/2008 08:00'), to_date('09/02/2008 08:15') from dual union all
    11              select 12, 15, to_date('09/02/2008 08:15'), to_date('09/02/2008 08:30') from dual union all
    12              select 13, 15, to_date('09/02/2008 08:30'), to_date('09/02/2008 08:45') from dual union all
    13              select 14, 15, to_date('09/02/2008 08:45'), to_date('09/02/2008 09:00') from dual union all
    14              select 15, 15, to_date('09/02/2008 09:00'), to_date('09/02/2008 09:15') from dual union all
    15              select 16, 15, to_date('09/02/2008 09:15'), to_date('09/02/2008 09:30') from dual union all
    16              select 17, 15, to_date('09/02/2008 09:30'), to_date('09/02/2008 09:45') from dual union all
    17              select 18, 15, to_date('09/02/2008 09:45'), to_date('09/02/2008 10:00') from dual union all
    18              select 19, 15, to_date('09/02/2008 10:00'), to_date('09/02/2008 10:15') from dual union all
    19              select 20, 15, to_date('09/02/2008 10:15'), to_date('09/02/2008 10:30') from dual union all
    20              select 21, 30, to_date('09/02/2008 10:30'), to_date('09/02/2008 11:00') from dual union all
    21              select 22, 15, to_date('09/02/2008 11:00'), to_date('09/02/2008 11:15') from dual
    22             ),
    23       t2 as (
    24              select  id,
    25                      duration,
    26                      start_date,
    27                      end_date,
    28                      case
    29                        when lead(start_date,1,end_date - 1) over(order by id) != end_date then 1
    30                        when duration + lead(duration) over(order by id) > 45 then 1
    31                        when lead(start_date,2,end_date - 1) over(order by id) != lead(end_date) over(order by id) then 2
    32                        when duration + lead(duration) over(order by id) + lead(duration,2) over(order by id) > 45 then 2
    33                        else 3
    34                      end grp_size,
    35                      case
    36                        when lead(start_date,1,end_date - 1) over(order by id) != end_date then duration
    37                        when duration + lead(duration) over(order by id) > 45 then duration
    38                        when lead(start_date,2,end_date - 1) over(order by id) != lead(end_date) over(order by id) then duration + lead(duration) over(order by id)
    39                        when duration + lead(duration) over(order by id) + lead(duration,2) over(order by id) > 45 then duration + lead(duration) over(order by id)
    40                        else duration + lead(duration) over(order by id) + lead(duration,2) over(order by id)
    41                      end grp_duration,
    42                      row_number() over(order by id) rn
    43                from  t1
    44             ),
    45       t3 as (
    46              select  id,
    47                      level grp_number,
    48                      grp_duration
    49                from  t2
    50                start with id = 1
    51                connect by rn = prior rn + prior grp_size
    52             )
    53  select     t1.*,
    54          max(t3.grp_number) over(order by t1.id) grp_number,
    55          last_value(t3.grp_duration ignore nulls) over(order by t1.id) grp_duration
    56    from     t1,
    57          t3
    58    where t1.id = t3.id(+)
    59    order by t1.id
    60  /
            ID   DURATION START_DATE       END_DATE         GRP_NUMBER GRP_DURATION
             1         15 08/01/2008 10:00 08/01/2008 10:15          1           45
             2         15 08/01/2008 10:15 08/01/2008 10:30          1           45
             3         15 08/01/2008 10:30 08/01/2008 10:45          1           45
             4         15 08/01/2008 11:00 08/01/2008 11:15          2           15
             5         15 08/01/2008 11:30 08/01/2008 11:45          3           45
             6         15 08/01/2008 11:45 08/01/2008 12:00          3           45
             7         15 08/01/2008 12:00 08/01/2008 12:15          3           45
             8         45 08/01/2008 13:00 08/01/2008 13:45          4           45
            11         15 09/02/2008 08:00 09/02/2008 08:15          5           45
            12         15 09/02/2008 08:15 09/02/2008 08:30          5           45
            13         15 09/02/2008 08:30 09/02/2008 08:45          5           45
            ID   DURATION START_DATE       END_DATE         GRP_NUMBER GRP_DURATION
            14         15 09/02/2008 08:45 09/02/2008 09:00          6           45
            15         15 09/02/2008 09:00 09/02/2008 09:15          6           45
            16         15 09/02/2008 09:15 09/02/2008 09:30          6           45
            17         15 09/02/2008 09:30 09/02/2008 09:45          7           45
            18         15 09/02/2008 09:45 09/02/2008 10:00          7           45
            19         15 09/02/2008 10:00 09/02/2008 10:15          7           45
            20         15 09/02/2008 10:15 09/02/2008 10:30          8           45
            21         30 09/02/2008 10:30 09/02/2008 11:00          8           45
            22         15 09/02/2008 11:00 09/02/2008 11:15          9           15
    20 rows selected.
    SQL> SY.

  • Disable Table field cells based on Row Data

    Hi,
    Need to disable cells of a simple table based on a row level value. For example: if the column6 value for 3rd row is 'A' disable column2 for the 3rd row (No User entry can be made). This behaviour would be same for all rows having column6 as 'A'.
    Please advise.
    Thanks
    Anirban
    Edited by: user1580623 on Jun 29, 2009 6:31 AM

    Anirban,
    Please check the Switcher Bean. You need to associate an attribute to the Switcher. It would have multiple cases (items under them). Based on the value of the Switcher attribute appropriate Case is selected.
    In your VO you can write a decode logic to set the value of Switcher attribute based on the conditions. The selected case can have disabled items and hence you can get the behaviour of your choice.
    Regards
    Sumit

  • Getting the last set of records based on a Date Field

    Hi All
    i have the followings data set in a table
    TRACK_ID_GRP     TRACK_ID_NBR     TRACK_SAMPLE_ID     START_DATE
    970150                      129700104071     64260                        8/6/2002
    970150                      229700101893     64261                        8/6/2002
    970150                     149700101893     64262                        8/6/2002
    970150                       97015011     79252                        9/19/2005
    970150                       97015023     79255                        9/19/2005
    970150                       97015013     79253                         9/19/2005
    970150                       97015021     79254                        9/19/2005
    970040                      129900105213     56155                         9/26/2000
    970040                                 1101     29841                        6/9/1998
    970040                       97004023     143349                        10/28/2008
    970040                              2101     29842                        6/9/1998
    970040                        97004021     143348                        10/28/2008
    970040                       97004011     143346                        10/28/2008
    970040                      149700101903     64196                       7/16/2002
    970040                              2301     29844                      6/9/1998
    970040                         97004013     143347                         10/28/2008
    970040                                  1301       29843                        6/9/1998I need to get only those records with the latest date and i'm using the following query
    SELECT t.track_id_grp, t.track_id_nbr, t.track_sample_id,
           MAX (t.start_date) OVER (PARTITION BY t.track_id_grp) AS start_date
      FROM track_table t
    WHERE t.track_id_grp IN ('970150', '970040')And i'm getting the following dataset
    TRACK_ID_GRP     TRACK_ID_NBR     TRACK_SAMPLE_ID     START_DATE
    970040                      1.299E+11     56155     10/28/2008
    970040                      1101                     29841     10/28/2008
    970040                      97004023                     143349     10/28/2008
    970040                      2101                     29842     10/28/2008
    970040                      97004021                     143348     10/28/2008
    970040                      97004011                     143346     10/28/2008
    970040                      1.497E+11     64196     10/28/2008
    970040                      2301                     29844     10/28/2008
    970040                      97004013                     143347     10/28/2008
    970040                      1301                     29843     10/28/2008
    970150                      1.297E+11     64260     9/19/2005
    970150                      97015011                     79252     9/19/2005
    970150                      97015021                     79254     9/19/2005
    970150                      2.297E+11     64261     9/19/2005
    970150                      97015013                     79253     9/19/2005
    970150                      97015023                     79255     9/19/2005
    970150                      149700101903     64262     9/19/2005And i was expecting the following dataset
    TRACK_ID_GRP     TRACK_ID_NBR     TRACK_SAMPLE_ID     START_DATE
    970150                      97015011                             79252     9/19/2005
    970150                      97015023                             79255     9/19/2005
    970150                      97015013                             79253     9/19/2005
    970150                      97015021                             79254     9/19/2005
    970040                      97004023                             143349     10/28/2008
    970040                      97004021                             143348     10/28/2008
    970040                      97004011                             143346     10/28/2008
    970040                      97004013                             143347     10/28/2008I was expecting to get only those records with the latest date, instead i'm getting all the records with the max date in it, please need help or advice.
    Thanks

    Try this -
    SELECT track_id_grp, track_id_nbr, track_sample_id, start_date
      FROM (SELECT t.track_id_grp, t.track_id_nbr, t.track_sample_id,
                   t.start_date,
                   ROW_NUMBER () OVER (PARTITION BY t.track_id_grp, t.track_sample_id ORDER BY t.start_date DESC)
                                                                            AS rn
              FROM track_table t
             WHERE t.track_id_grp IN ('970150', '970040'))
    WHERE rn = 1let me know if that works.
    Edited by: Sri on Apr 28, 2011 9:24 AM

  • Cursor and Update rows based on value/date

    SQL Server 2012
    Microsoft SQL Server Management Studio
    11.0.3128.0
    Microsoft Analysis Services Client Tools
    11.0.3128.0
    Microsoft Data Access Components (MDAC)
    6.1.7601.17514
    Microsoft MSXML 3.0 4.0 5.0 6.0 
    Microsoft Internet Explorer
    9.11.9600.16518
    Microsoft .NET Framework
    4.0.30319.18408
    Operating System
    6.1.7601
    The objective of this is to test the Cursor and use it on a production environment after this is fixed. What I would like to do is update rows in a column i duplicated originally called 'HiredDate' from AdventureWorks2012 HumanResources.Employee table. I
    made a duplicate column called 'DateToChange' and would like to change it based on a date I have picked, which returns normally 2 results (i.e. date is '04/07/2003'). The code runs but will not change both dates. It did run however with an error but changed
    only 1 of the 2 rows because it said ['nothing available in next fetch'].
    The code to add the columns and perform the query to get the results I am running this against:
    -- ADD column 'DateToChange'
    ALTER TABLE [HumanResources].[Employee] ADD DateToChange Date NOT NULL;
    -- Copy 'HireDate' data to 'DateToChange'
    UPDATE HumanResources.Employee SET DateToChange = HireDate;
    -- Change 'DateToChange' to NOT NULL
    ALTER TABLE [HumanResources].[Employee] ALTER COLUMN DateToChange Date NOT NULL;
    SELECT BusinessEntityID,HireDate, CONVERT( char(10),[DateToChange],101) AS [Formatted Hire Date]
    FROM HumanResources.Employee
    WHERE [DateToChange] = '04/07/2003';
    Code:
    USE AdventureWorks2012;
    GO
    -- Holds output of the CURSOR
    DECLARE @EmployeeID INT
    DECLARE @HiredDate DATETIME
    DECLARE @HiredModified DATETIME
    DECLARE @ChangeDateTo DATETIME
    --Declare cursor
    -- SCROLL CURSOR ALLOWS "for extra options" to pul multiple records: i.e. PRIOR, ABSOLUTE ##, RELATIVE ##
    DECLARE TestCursor CURSOR SCROLL FOR
    -- SELECT statement of what records going to be used by CURSOR
    -- Assign the query to the cursor.
    SELECT /*HumanResources.Employee.BusinessEntityID, HumanResources.Employee.HireDate,*/ CONVERT( char(10),[DateToChange],101) AS [Formatted Hire Date]
    FROM HumanResources.Employee
    WHERE DateToChange = '01/01/1901'
    /*ORDER BY HireDate DESC*/ FOR UPDATE OF [DateToChange];
    -- Initiate CURSOR and load records
    OPEN TestCursor
    -- Get first row from query
    FETCH NEXT FROM TestCursor
    INTO @HiredModified
    -- Logic to tell the Cursor while "@@FETCH_STATUS" 0 the cursor has successfully fetched the next record.
    WHILE (@@FETCH_STATUS = 0 AND @@CURSOR_ROWS = -1)
    BEGIN
    FETCH NEXT FROM TestCursor
    IF (@HiredModified = '04/07/2003')/*05/18/2006*/
    -- Sets @HiredModifiedDate data to use for the change
    SELECT @ChangeDateTo = '01/01/1901'
    UPDATE HumanResources.Employee
    SET [DateToChange] = @ChangeDateTo --'01/01/1901'
    FROM HumanResources.Employee
    WHERE CURRENT OF TestCursor;
    END
    -- CLOSE CURSOR
    CLOSE TestCursor;
    -- Remove any references held by cursor
    DEALLOCATE TestCursor;
    GO
    This query is run successfully but it does not produce the desired results to change the dates
    04/07/2003 to 01/01/1901.
    I would like the query to essentially be able to run the initial select statement, and then update and iterate through the returned results while replacing the necessary column in each row.
    I am also open to changes or a different design all together. 
    For this query I need:
    1. To narrow the initial set of information
    2. Check if the information returned, in particular a date, is before [i.e. this current month minus 12 months or
    12 months before current month]
    3. Next replace the dates with the needed date
    [Haven't written this out yet but it will need to be done]
    4. After all this is done I will then need to update a column on each row:
    if the 'date' is within 12 months to 12 months from the date checked
    NOTE: I am new to TSQL and have only been doing this for a few days, but I will understand or read up on what is explained if given enough information. Thank you in advance for anyone who may be able to help.

    The first thing you need to do is forget about cursors.  Those are rarely needed.  Instead you need to learn the basics of the tsql language and how to work with data in sets.  For starters, your looping logic is incorrect.  You open
    the cursur and immediately fetch the first row.  You enter the loop and the first thing in the loop does what?  Fetches another row.  That means you have "lost" the values from the first row fetched.  You also do not test the success of
    that fetch but immediately try to use the fetched value.  In addition, your cursor includes the condition "DateToChange = '01/01/1901' " - by extension you only select rows where HireDate is Jan 1 1901.  So the value fetched into @HiredModified will
    never be anything different - it will always be Jan 1 1901.  The IF logic inside your loop will always evaluate to FALSE.  
    But forget all that.  In words, tell us what you are trying to do.  It seems that you intend to add a new column to a table - one that is not null (ultimately) and is set to a particular value based on some criteria.  Since you intend the
    column to be not null, it is simpler to just add the column as not null with a default.  Because you are adding the column, the assumption is that you need to set the appropriate value for EVERY row in the table so the actual default value can be anything.
     Given the bogosity of the 1/1/1901 value, why not use this as your default and then set the column based on the Hiredate afterwards.  Simply follow the alter table statement with an update statement.  I don't really understand what your logic
    or goal is, but perhaps that will come with a better description.  In short: 
    alter table xxx add DateToChange date default '19010101'
    update xxx set DateToChange = HireDate where [some unclear condition]
    Lastly, you should consider wrapping everything you do in a transaction so that you recover from any errors.  In a production system, you should consider making a backup immediately before you do anything - strongly consider and have a good reason not
    to do so if that is your choice (and have a recovery plan just in case). 

  • Build a table based on XML data set with Spry

    Hi there,
    I'm new to spry technology therefore forgive any basic question of mine.
    I'm trying to fill content in a table based on XML data set values but nothing is shown :-(
    here is my code.... any suggestion? pls tell me where I'm wrong.
    Thank you in advance
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    var uscite = new Spry.Data.XMLDataSet("data/Calendario 2011.xml", "csv_data_records/record", {sortOnLoad: "Date", sortOrderOnLoad: "ascending"});
    uscite.setColumnType("Date", "date");
    uscite.setColumnType("km", "number");
    </script>
    <div class="RankContainer" id="UsciteDiv" spry:region="uscite" >
              <table width="100%" border="0" class="RankTable">
                <tr>
                  <th width="10%" scope="col" spry:sort="Date">Data</th>
                  <th width="20%" scope="col">Destinazione</th>
                  <th width="5%" scope="col">KM</th>
                  <th width="35%" scope="col">Percorso</th>
                  <th width="30%" scope="col">Breve</th>
                 <!-- <th width="15%" scope="col">Mappa</th>-->
                </tr>
                <tr>
                   <script type="text/javascript">
           var rows = uscite.getData();
        for (var i = 0; i < rows.length; i++)
         if (rows[i]["Mappa"].startsWith("/"))
          rowContent = "<td> si </td>";
         else
              rowContent = "<td> no </td>";
         document.write("<td>{Date}</td>");
         document.write("<td>"+rowContent+"</td>");
         document.write("<td>{km}</td>");
         document.write("<td>{Percorso}</td>");
         document.write("<td>{Breve}</td>");
          </script>
               </tr>
              </table>
           </div>

    Sure this is how it should work (except that no anchor tag shall be present for Destinazione whereas Mappa has no real value in)
    http://www.gsc-borsano.it/_Calendario%202011.html
    and this is the non working page
    http://www.gsc-borsano.it/_v2Calendario%202011.html
    Thanks

  • How to make a table column block editable for a row and remain non editable for other row based on some condition

    hi ,
    i need help on the below scenario ,
    we have a web dynpro table with different columns, now based on new business requirement  one of the column need to     
    dynamically editable or non editable for different row.
    for ex :
    Field 1
    Field 2 ( Dynamic field )
    Field 3
    Field 4
    Data 11
    Data 12 ( Editable with Drop down   )
    data 13
    data 14
    Data 21
    Data 22 ( Non editable )
    Data 23
    data 24
    Data 31
    data  32 ( Editable with drop down )
    data 33
    data 34
    how to achieve this ? please help on this.
    Thanks in advance
    Thanks
    Manish

    Manish,
    there is no proper way to insert two Cell Editors in a column(except variants), have a look on below scenario, it may help.
    add one more attribute to your table context node for read-only.
    create dropDown as celleditor for table and bind with newly created attribute to read-only property of dropdown.
    before binding data to table, check the condition then mention readonly value abap_true / false.
    @ we can achieve by the use of Variants.
    for ex :
    Data 11
    Data 12 ( Editable with Drop down)
    data 13
    read-only - abap_false
    Data 21
    Data 22 ( Non editable, dropdown )
    Data 23
    read-only - abap_true
    Data 31
    data  32 ( Editable with drop down )
    data 33
    read-only - abap_false

  • How to suppress a row based on current date -  at query level?

    In an Bex query report i have suppress rows based on current date.
    There is no current date available in query.
    there is a date field in the query.
    If by chance the date in that field is lesser than current date, I have to suppress that row.
    How can this be achieved?

    What is the code ofr creating a variable to get values >= to current date?
    I have implemented the following code which is not working.
    data L_S_range like line of E_T_range[].
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'GE'.
    L_S_RANGE-LOW = SY-DATUM.
    APPEND L_S_RANGE TO E_T_RANGE[].
    Actually i have written in class, which will be inherited in superclass.
    Edited by: akshara20 on Feb 2, 2011 1:21 PM

  • Header row in ALV Grid, based on the data in the table

    Hi All,
    I have a requirement wherein, based on the data in the table used for ALV, i need to add rows as sort of header in the ALV display.
    For e.g. my table has
    Appl No.  Item  Material  Desc.           Cost                 -> Column Heading
    1             10     400        Excavation    10.00               -> Data
    1             20     400        Footing         10.00
    2             10     400        Excavation    10.00
    2             20     400        Footing         10.00
    For every new Appl No., i need to add a row, or sort of header specifying the appl no. details. means
    Appl No.  Item  Material  Desc.           Cost
    Appli. No. 1                   Date: 01/01/1009                   -> my requirement
    1             10     400        Excavation    10.00
    1             20     400        Footing         10.00
    Appli. No. 2                   Date: 02/01/1009
    2             10     400        Excavation    10.00
    2             20     400        Footing         10.00
    Is this possible in ALV my any means? Currently i m using normal ALV Grid
    Regards,
    Janaki

    Hi..
         Try like this... I think u have Application number and date in ur table ... First get the total table data into internal table.. and to add the row
         *Declare the var1 as 0 and var2.
    loop at internal table
         *var1 = var1 +1
    when application number =var1
             concatenate : 'Appli. No.' (table- appli no field) 'Date:'  (table-date field) into var2.
    perform display(some name)
         *endloop.
         *form display...
              alv display part.. first give that var2 like eg.. wa_alv-field= 'var2'.
    end form.
        Hope this will help u .....
    Regards,
    Abaper

  • Setting the series color of a bi beans graph based on the data values

    How do I conditionally set the series color of a bi beans graph based on the data values?
    I am using the following code to get the data values and set the series color:
    Graph gr=(Graph)CmdrDashboardP1_pres1.getView();
    DataAccess da=gr.getGraphModel().getDataAccess();
    DataDirector dd=gr.getDataDirector();
    DataMap dm=dd.getDataMap();
    int re=dd.ROW_EDGE;
    int ce=dd.COLUMN_EDGE;
    Object val=da.getValue(re,ce,dm.DATA_TYPE);
    int seriesCount=da.getEdgeCurrentSlice(DataDirector.ROW_EDGE);
    if (val <=45.0)
    gr.getSeries().setColor(new Color(255,0,0),seriesCount);
    I get a NullPointerException from the line of code "Object val=da.getValue(re,ce,dm.DATA_TYPE)." I have tried the code with DATA_UNFORMATTED as well, but get the same exception. When I print the DataMap value of dm the results are [dataUnformatted, dataViewFormat, value, dataIsTotal, dataType].
    Also, I get the error "method <= (java.lang.Object,double) not found in class _CmdrDashboardP1" from the "if (val <=45.0)" code.
    Thanks for any assistance

    How do I conditionally set the series color of a bi beans graph based on the data values?
    I am using the following code to get the data values and set the series color:
    Graph gr=(Graph)CmdrDashboardP1_pres1.getView();
    DataAccess da=gr.getGraphModel().getDataAccess();
    DataDirector dd=gr.getDataDirector();
    DataMap dm=dd.getDataMap();
    int re=dd.ROW_EDGE;
    int ce=dd.COLUMN_EDGE;
    Object val=da.getValue(re,ce,dm.DATA_TYPE);
    int seriesCount=da.getEdgeCurrentSlice(DataDirector.ROW_EDGE);
    if (val <=45.0)
    gr.getSeries().setColor(new Color(255,0,0),seriesCount);
    I get a NullPointerException from the line of code "Object val=da.getValue(re,ce,dm.DATA_TYPE)." I have tried the code with DATA_UNFORMATTED as well, but get the same exception. When I print the DataMap value of dm the results are [dataUnformatted, dataViewFormat, value, dataIsTotal, dataType].
    Also, I get the error "method <= (java.lang.Object,double) not found in class _CmdrDashboardP1" from the "if (val <=45.0)" code.
    Thanks for any assistance

  • Setting Non-Editable property for selected Rows in jTable

    Hi,
    I want particular rows to be set non-editable within a jTable. For example. If I have seven rows as follows:
    1
    2 - (Non-editable)
    3
    4
    5 - (Non-editable)
    6
    7
    I want to set non-Editable property to the second & Fifth Rows(say) alone. Other Rows, I may edit.
    How can I do this?
    Thanks in adv.

    TableModel has method
    boolean isCellEditable(int rowIndex,
    int columnIndex)
    so you need to make your table model return false for these rows.

  • How to display different icon within WDA alv table base on row data ?

    Hi,
    is that possible to display different icon for every row within ALV table depending on the row data ?
    for instance if the status 'S' display ~Icon/SuccessMessage and 'E' display ~Icon/ErrorMessage ?
    because base on this code below i only can set 1 icon for the whole row data.
    LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'ICO'.
            CREATE OBJECT lr_caption.
               lr_caption->set_image_source( value = '~Icon/SuccessMessage').
               <fs_column>-r_column->set_cell_editor( lr_caption ).
        ENDCASE.
      ENDLOOP.
    Thank you in advance.
    Fernand

    Hello,
    Yes it is possible to display different images based on data.
    For that what you can do is create one attribute 'STATUS' of type string in context node which you are mapping to ALV.
    And fill that attribute with the path to image based on your requirement like for status 'S' set the attribute to ~Icon/SuccessMessage and if status is 'E', set it to ~Icon/ErrorMessage at runtime.
    Now in the settings for ALV use the following code:
    * Display icon in column seatsocc
      DATA: lr_column TYPE REF TO cl_salv_wd_column,
            lr_image TYPE REF TO cl_salv_wd_uie_image,
            lv_icon TYPE string.
      lr_column = lv_model->if_salv_wd_column_settings~get_column( 'SEATSOCC' ).
      CREATE OBJECT lr_image.
      lr_image->SET_SOURCE_FIELDNAME( 'STATUS' ).
      lr_column->set_cell_editor( lr_image ).
    in the above code, column 'SEATSOCC' will be displayed as an icon.
    Sample code to fill the attribute 'STATUS'
    LOOP AT lt_flights INTO ls_flight.
        lv_seatsfree = ls_flight-seatsmax - ls_flight-seatsocc.
        IF lv_seatsfree = 0.
          ls_flight-status = 'ICON_RED_LIGHT'.
        ELSEIF lv_seatsfree <= 50.
          ls_flight-status = 'ICON_YELLOW_LIGHT'.
        ELSE.
          ls_flight-status = 'ICON_GREEN_LIGHT'.
        ENDIF.
        MODIFY lt_flights FROM ls_flight.
      ENDLOOP.
    Hope this helps!
    Regards,
    Srilatha
    Edited by: Srilatha M on Jun 25, 2010 12:02 PM

  • Display and edit currently selected row of ADF Table in ADF Form

    I have an ADF Read-only Table and ADF Form, which were created from the same Data Control.
    I need to be able to edit the selected row of the table in the form (just like in "Binding Data Controls to your JSF page" part of "Developing RIA Web Applications with Oracle ADF" Tutorial). However, I can't figure out how to do this :(
    I found the following solution on the Web: #{bindings.DeptView1.currentRow.dataProvider.dname} - but it doesn't work, since "the class oracle.jbo.server.ViewRowImpl does not have the property dataProvider".
    Sorry for the newbie question.
    Thanks in advance for any help!

    Hi,
    AFAIK, dataProvider is not supported on ADF BC, hence the error.
    If you have created ADF Read only table and form from the same data control you just need to refresh the form based on table selection to show up the selected record, to do which you just need to add partialTriggers property to the panelFormLayout and set its value to the id of table
    Sireesha

  • Filtering an EVDRE report based on a Data Value

    Everyone,
    I have a report that has accounts in the columns without expansion. I am capturing various status codes in one account and I need to know how to filter the report based on a data value that is retrieved from the database for this account.I am also using the EVdre sort functionality along with an EVSUB in the after range which  sub totals the Organization and Materials Dimensions in the rows.  When I try to use native Excel to filter  based on the value of the Status Code Account  the report will only sort the top section of the report. As soon as it hits the Subtotals it stops filtering. Is there a way to filter the report in EVDRE based on the data value that is returned from the database.
    The account that I want to filter on is Status Code. We can have two values in it either 10 = Submitted or 30 = Business Case. The users want to be able to filter the report to only show the status code of 10 (Submitted) for their Executives to review.
    Edited by: eleasha counts on Aug 3, 2011 12:22 PM

    Hi eleasha,
    I don't know if you will entertain FORMATRANGE.
    But you can use formatrange to hide those rows you donot want to see.
    You can use the CRITERIA as VALUE=<<anyvalue>> you want to verify and apply it on rows.
    You can set the PARAMETER value as ROWHEIGHT=0, and apply to ALL.
    Try this with the combinations you need to see.
    Hope this helps.
    Karthik AJ

Maybe you are looking for

  • IN pages how does one remove an unwanted template?

    Hello world!  First time here! Question #1  How does one delete unwanted templates in the "My Template" section of Pages? Question #2  How does one, using Lion, retrieve Appleworks 6 database files? Thanks VAGrandad

  • Playing mp3's from FTP server in Safari

    Hey guys, I've recently bought a new iphone and I have managed to connect to my popcorn hour c-200 in safari (by going to 'ftp://nmt:[email protected]') It successfully loads the share list and I can move around all my files, it can display pictures,

  • App made with Director runs slower and slower

    Testing our nearly completed game, we are finding that on systems with 1GB memory, the game will run smoothly at first but after playing the game 4-5 times, it really slows down frame rate wise. Systems with 2GB seem to be fine. So. it seems it is ru

  • Graphical installation not working on my laptop?

    Hi I have a Dell Inspiron E1505 with an ATI Mobility x1400 and whenever I use the Solaris 10 DVD to try and install whenever I select graphics installation option I get corrupted graphics and I have to restart. Does anybody know how to fix this? When

  • My iMac got a new logic board, now my HP printer doesn't work

    I have had my Intel iMac 24" using OS 10.7.5 in the shop a lot lately. One of the things they replaced was the logic board. Now my iMac seems to be working great, but my HP printer stopped working. It's and older printer, Officejet All-in-One. I trie