Fetching column data for clicked DataGrid cell

I am using a DataGrid and the number of columns are based on the data thus dynamic; columns are added at runtime.  I am trying to use the same ItemRenderer for all columns.  The one piece I can not seem to get to work is knowing which datafield to use to populate each column.  I have tried getting the column.dataField from the current datacolumn to no avail; sample code listed below.  This is my first Flex project so my approach to the problem may not be the best; please alert me if this is the case.  I would appreciate any help you could lend.
                var dgListData:DataGridListData = listData as DataGridListData;
                var dataGrid:DataGrid = dgListData.owner as DataGrid;
                var column:DataGridColumn = dataGrid.columns[dgListData.columnIndex];
                var dataField = column.dataField;
                var lbl:Label = new Label();
                lbl.text = value[dataField];    // must add based on previously named source field; dataField
ce

Update:
     A few more details...
I am trying to do this inside of override public function set data(value:Object):void {}

Similar Messages

  • Tables or fm to fetch the data for idoc type WMMBID01

    hi
    i have to create function module in whish i have to fill segments of  idoc type
    WMMBID01.
    is there any fm which can fetch the data for the required fields of segment based on the document no.
    or which tables i can use to fetch the required data for goods issued ie transaction migo.
    regards
    vijay

    HI
    GOOD
    TRY WITH THESE FM
    DYNP_VALUES_READ Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
    HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
    RPY_DYNPRO_READ Read dynpro, including screen flow
    RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
    THANKS
    MRUTYUN

  • On iPhone 5c iOS 8.2, I go to settings, cellular, use cellular data for: Under "use cell data for are my apps but they are greyed out how can I ungrey them??

    iOS 8.2 on iPhone 5c, goto settings, cellular, use cellular data for: all my apps under "use cellular data for" are greyed out. I've restart and hard reset. Looked thru all settings. Can someone help??

    Did you try to reset the phone by holding the sleep and home button for about 10sec, until the Appel logo comes back again? You will not lose data by resetting.
    If this does not work, did you try to switch off Cellular Data, restart the phone and switch it back on again?

  • BAPI to fetch Delivery Data for  a given delivery number

    Hi Experts,
    Is there any SAP Standard BAPI to Fetch the Delivery/Picking data.
    Just to fetch  all the Delivery/Picking related data from SAP on Providing a Delivery Doc number.
    I will be thankful to you , if u let me know how to connect VB application to SAP using BAPI to fetch the data to VB application.
    Thanks & regards,
    Prashanth

    Go thru these links
    [link1|http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
    [link2|http://searchsap.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid21_cid417095,00.html]
    [link3|http://www.experts-exchange.com/Database/Software/ERP/SAP_ERP/Q_20693539.html]
    Regards,
    SAPient

  • How do I supress column data for duplicte data?

    I want to create a report that will only show high level data once on the first instance. For example, and order list which shows the order number and date once on the fist record (along with order detail info) and surpress it on subsequent detail records.
    Thanks
    Dave

    Hi Dave,
    Have a look at: Re: Grouping on reports (not interactive)
    You could also try concatenating the values into a single column in your SQL statement and then do column breaking on that column instead.
    Andy

  • How to fetch column data using foreign key in adf table ?

    I have created a adf table using a view that has a group id and user id column. I want to display the user name ( from user table) and group name from group table. I had created view links to the corresponding tables from the user_group view ( whose iterator is used to render the table).
    It sort of works. I dragged the user name from the embedded user iterator in user_group iterator. It does find the correct user name but if I have more than one row, it displays the user name of the last row user in all rows !
    Is there a solution to this problem ?

    Well, I saw in the view query for the association view ( for Many-Many) that the SQL already had the joins with the two ( master) tables to the association table. So I went ahead and added the descriptive columns to the select clause. Then the selected columns showed up in the attribute list by themselves ( without my intervention). So far so good.
    Then I recreated the adf table attribute by dragging these newly selected attribute to the page. I still see that the value of the attribute is the same in all the rows - this time it is the value for the FIRST row. It doesn't correspond to the foreign key for that particular row.
    IS THIS A BUG ? Has anyone else ever done this ?

  • I want to retrieve data for condition record during certain time period.

    Hi Experts,
    Please suggest me some T-Code for retrieving condition record date or Database Table where I can access the data with the  combination of Sales Organization, distribution channel, customer and plant.
    Looking for your expert comments....
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    thanks in advance..
    With Best Regards,
    Bharat B
    Edited by: Rob Burbank on Jan 21, 2011 5:40 PM

    To search for data/all the relevant condition for a particular condition type(like for example PR00) for a particular date range you can got to VK13 and give that particular condition type for which you want the data for.After giving he condition type click on key combinations and choose for which condition you want the data for.
    Like for example I want to fetch the data for PR00 then I will go to VK13 ,give PR00 then choose the relevant combination and then take a F1 for the first field.by this I will be able to determine the table in which all the condition data is stored for the particular combination.Like for the combination of sales org./dist channel./customer/material we have the table A815.Now by going to SE16 and giving table as A815 i will be able to fetch all the relevant data.(in your case based upon the valid from and valid to date).You can also use table KONP for a particular condition record number details.

  • Double click on Datagrid cell

    Hi,
    I'm developing an application where I'm using a datagrid that shows some information from an xml. Every cell in the grid is of the form
    <itemRenderer>
    <compoment>
    <Vbox>
    <HBox>
    <Text/> //some text goes within this block
    <Text/> //some text goes within this block
    <Text/> //some text goes within this block
    </Hbox>
    </VBox>
    </component>
    </itemRenderer>
    I have set a function call for the datagrid on ItemDoubleClick event; and this even gets triggered only when i double click on any TEXT that is on the cell; and NOT on any part of the cell. However, I would like to have this triggered when the user clicks anywhere in the cell.
    Sombody please help,
    Thanks!!

    Hi,
    Thanks for the suggestion. Maybe I wasn't clear in explaining the issue here. Let me throw some light now, My code is somewhat like this
    <mx:VBox opaqueBackground="{myxml.@data>10 ?  '0xA2FEA2' : '0xFEA2A2' }" width="100%" height="100%" verticalScrollPolicy="off">
         <mx:Box width="100%" height="100%">
              <mx:Text id="txt1" text="Available" width="100%"/>
               <mx:Text id="txt2" text="{myxml.@data}"/>
         </mx:Box>
    </mx:VBox>
    The output is shown in the attachment. Now whenever I double click on the text in the datagrid(highlighted in blue in the attachment) my doubleclick even is fired; but if i click anywhere in the cell(green region in the attachment) my doubleclick event is not called.
    Hope this helps! Looking forward for your assistance,
    Thanks again!!
    Cheers

  • Creating hyperlink on DataGrid Cell Data

    Hi All,
    Having created a Datagrid with displays Product names in the 1st column, is it possible to create individual hyperlinks on the data in this column. The result would be that when the User clicks on any one of the Product names a Internet Explorer browser window would open showing more details about the Product selected?
    Thanks,
    J

    Here is my column definition for a link:
    <mx:DataGridColumn
    headerText="View" dataField="link" width="50" editable="
    false" textAlign="center">
    <mx:itemRenderer>
    <fx:Component>
    <mx:LinkButton label=". . ." color="blue" fontSize="16" fontWeight="
    bold">
    </mx:LinkButton>
    </fx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    You will need to set a click listener for LinkButton. To open a new window I use this:
    reportString =
    "window.open('" + reportString + "',
    ShipInfo', 'status=0,toolbar=0,resizable=yes')";ExternalInterface.call(reportString);
    Basically it is a JavaScript window.open method.
    HTH

  • How make datagrid cell clicking not to affect the row selected?

    Hi all,
    I made SelectionUnit as FullRow. The first column, second column, and so on, which can work well for selecting row when I clicking the cells of them.
    But I want the last column to remove the affection that the whole row is selected when I click last column cell.
    how to do it? thanks.
    <DataGrid ItemsSource="{Binding itemSource}" AutoGenerateColumns="False" RowHeight="25" SelectionUnit="FullRow"

    You could set the AutogenerateColumns property to false, define all columns in the XAML markup explicitly and then specify a CellTemplate for the last column and handle its MouseLeftButtonDown event to change the SelectionUnit property of the DataGrid. Here
    is an example for you:
    <DataGrid x:Name="dg" AutoGenerateColumns="False" RowHeight="25" SelectionUnit="FullRow">
    <DataGrid.Resources>
    <Style TargetType="DataGridCell">
    <EventSetter Event="PreviewMouseLeftButtonDown" Handler="cell_MouseLeftButtonDown"/>
    </Style>
    </DataGrid.Resources>
    <DataGrid.Columns>
    <DataGridTextColumn Binding="{Binding A}"/>
    <DataGridTextColumn Binding="{Binding B}"/>
    <DataGridTextColumn Binding="{Binding C}">
    <DataGridTextColumn.CellStyle>
    <Style TargetType="DataGridCell">
    <EventSetter Event="PreviewMouseLeftButtonDown" Handler="cell_MouseLeftButtonDownLast"/>
    </Style>
    </DataGridTextColumn.CellStyle>
    </DataGridTextColumn>
    </DataGrid.Columns>
    </DataGrid>
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    List<MyItem> items = new List<MyItem>();
    items.Add(new MyItem() { A = "1", B = "1", C = "1" });
    items.Add(new MyItem() { A = "2", B = "2", C = "2" });
    dg.ItemsSource = items;
    void cell_MouseLeftButtonDownLast(object sender, MouseButtonEventArgs e)
    dg.SelectionUnit = DataGridSelectionUnit.Cell;
    void cell_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    dg.SelectionUnit = DataGridSelectionUnit.FullRow;
    Please remember to mark all helpful posts as answer to close the thread and then please start a new thread if you have a new question.

  • ALV  List  in the same Column for the row  CELL  i need button or value

    Hi,
    In my ALV list  for the same column I need Button or  Value for the different rows (CELL) depending upon my condition.
    as well as I have to make  read only of 3 rd column CELL based on my first column dropdown value CELL for this Row Only.
    Depends upon the value in  column 1 /  row 2   I have to  read only  the CELL of   column 5 / row 2   ie for the same row.
    Depends upon the value in Column 1/ row 3    I have to   EDITABLE  or   Button   the CELL  of column 5 / row 3 ie for the same row
    How to do the logic for this.
    I tried and got it for the entire column only.
    But my requirement is for the sepecific cell in the column.
    Kindly help to proceed further.
    Thanks in advance.
    Dav

    Here is how you can make a particular cell in the row read-only based on certain conditions.
    In my example I am displaying the flight details in an ALV. Here I am checking the airline id and if it is "AA' I am making the cell in the column airline id as readonly. In my example I am putting a check and readonly on the same column. However you can do this for different columns as well.
    In order to achieve this you need to add a new context attribute 'READONLY' of type abap_bool to the context node which is bound to data node of ALV.
    The method where I populate the node has the following code to populate the data.
      data: lr_input_node type ref to if_wd_context_node,
            lr_flight_node type ref to if_wd_context_node,
            lv_cityfrom   type s_from_cit,
            lv_cityto     type s_to_city,
            ls_from       type bapisfldst,
            ls_to         type bapisfldst,
            lt_flights    type table of bapisfldat,
            ls_flights    type bapisfldat.
      data: lt_final type if_mainview=>elements_node_flighttab,
            ls_final type if_mainview=>element_node_flighttab.
    * Instantiate the variable lr_input_note to the node NODE_FLIGHT
      lr_input_node  = wd_context->get_child_node( name = 'NODE_FLIGHT' ).
    * Instantiate the variable lr_flight_note to the node NODE_FLIGHTTAB
      lr_flight_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' )
    * Get the attributes CityFrom und CityTo
      lr_input_node->get_attribute( exporting name = 'CITYFROM'
                                    importing value = lv_cityfrom ).
      lr_input_node->get_attribute( exporting name = 'CITYTO'
                                    importing value = lv_cityto ).
    * Fill the stuctures ls_from and ls_to
      ls_from-city = lv_cityfrom.
      ls_to-city   = lv_cityto.
    * Call the function BAPI_FLIGHT_GETLIST
      call function 'BAPI_FLIGHT_GETLIST'
       exporting
         destination_from       = ls_from
         destination_to         = ls_to
       tables
         flight_list            = lt_flights.
    Now I am going to check if the airline id is 'AA' and based on that I will fill the readonly context attribute.
    loop at lt_flights into ls_flights.
        MOVE-CORRESPONDING ls_flights to ls_final.
        if ls_flights-airlineid = 'AA'.
          ls_final-readonly = abap_true.
        else.
          ls_final-readonly = abap_false.
        endif.
        append ls_final to  lt_final.
      endloop.
    Finally bind the data to the context node.
    * Bind the data to the node NODE_FLIGHTTAB
      lr_flight_node->bind_elements( lt_final ).
    Now you need to do the ALV configuration settings.
    * create an instance of ALV component
      DATA:
        lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.
      lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
      IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
        lr_salv_wd_table_usage->create_component( ).
      ENDIF.
    * get ALV component
      DATA:
        lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
      wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
      CALL METHOD wd_this->alv_config_table->if_salv_wd_table_settings~set_read_only
        EXPORTING
          VALUE  = ABAP_FALSE
    * set visible row count
      DATA:
        lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= wd_this->alv_config_table.
      lr_table_settings->set_visible_row_count( '10' ).
      DATA:
        lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= wd_this->alv_config_table.
      DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
      lr_column = lr_column_settings->get_column( 'AIRLINEID' ).
      CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'AIRLINEID'.
      lr_column->set_cell_editor( lr_input_field ).
      lr_input_field->set_read_only_fieldname( value = 'READONLY' ).
      CALL METHOD lr_column_settings->delete_column
        EXPORTING
          id     = 'READONLY'

  • TS2621 settings will not allow me to click on email, it does not highlight email, account, or fetch new data

    Please give me some assistance with a problem that we have encountered with our ipod touch. We have lost the camera app, and most of all we need to change the email address on the ipod touch but when I go to settings, the email account, add account, fetch New Data will not highlight to allow me to click on them to access them to change them.
    I have forgotten the password on the ipod also, we set it when we first purchased it for my daughter and never used it again and we cannot remember for the life of us what that pass code is now.
    Thank you very much for your time with this matter.
    Catrina Hernandez
    <Email Edited By Host>

    Cat5214 wrote:
    I have forgotten the password on the ipod ...
    If you cannot remember the passcode, you will need to Restore the device...
    Connect to iTunes on the computer you usually Sync with and Restore...
    http://support.apple.com/kb/HT1414
    If necessary Place the Device into Recovery mode...
    http://support.apple.com/kb/HT1808
    Note on Recovery Mode.
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...
    But... if the Device has been Modified... this will Not necessarily work.

  • How to fetch data for sales order costing

    Hi All,
    How to fetch data for VA03 --> Extras --> Costing having cost element details.
    Thanks
    Gaurav

    Hi Gaurao ,
    There is no such function module  to extract data  in one column   , you have to  Convert all the columns data    in one column
    for period   .
    regards
    Deepak.

  • How to load a data from XML when a data is clicked in a datagrid

    Hi,
         I have populated a datagrid with XML data. My requirement is like, whenever a user clicks on a particular data i need to load a popup based on the data that he has selected.
         I'm using advanced datagrid in this process and i'm not able to trace the element that the user has selected in the datagrid.
         It would be great if someone could help me on how to trace this particular element and how to load the corresponding xml values. It really a burning issue in my project.

    Will this work for you:
    dataGrid.selectedItem.@yourfieldname
    with popup:
    var popupWindow:TitleWindow = new TitleWindow;
    popupWindow = showPopupWindow(DisplayObject(FlexGlobals.topLevelApplication), yourclassname);
    popupWindow.someproperty = dataGrid.selectedItem.@yourfieldname
    public function showPopupWindow(parent:DisplayObject, WhatToShow:Class):TitleWindow
         var popupWindow:TitleWindow =
         TitleWindow(PopUpManager.createPopUp(parent, WhatToShow, true));
          PopUpManager.centerPopUp(popupWindow);
          return popupWindow;
    Nothing to write home about, but hope it helps a bit.

  • Failed to retrieve long data for column "Contract Scope".

    Error: 0xC0202009 at Task 1 - Import P Data, Excel Source [1]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
    Error: 0xC0208265 at Task 1 - Import P Data, Excel Source [1]: Failed to retrieve long data for column "Contract Scope".
    Error: 0xC020901C at Task 1 - Import P Data, Excel Source [1]: There was an error with output column "Contract Scope" (33) on output "Excel Source Output" (9). The column status returned was: "DBSTATUS_UNAVAILABLE".
    Error: 0xC0209029 at Task 1 - Import P Data, Excel Source [1]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "Contract Scope" (33)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column
    "Contract Scope" (33)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
    Error: 0xC0047038 at Task 1 - Import P Data, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Excel Source" (1) returned error code 0xC0209029. The component returned a failure code when the pipeline engine called
    PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
    Information: 0x40043008 at Task 1 - Import P Data, SSIS.Pipeline: Post Execute phase is beginning.
    Information: 0x4004300B at Task 1 - Import P Data, SSIS.Pipeline: "component "OLE DB Destination" (95)" wrote 0 rows.
    Information: 0x40043009 at Task 1 - Import P Data, SSIS.Pipeline: Cleanup phase is beginning.
    I cant seem to change the size of the this column in the EXCEL SOURCE .It just changes it back to
    Unicode string [DT_WSTR] and 255 characters . This field contains strings greater than 255 characters .

    I found a great solution to limitation of excel when reading cells with a lot of text and when firts rows has no data!
    Look here: http://dataintegrity.wordpress.com/2009/10/16/xlsx/
    aaaa

Maybe you are looking for