How to resize the spark datagrid collumns based on the headertext?

Hi friends,
     I am using spark datagrid for displaying the tablur data in my application, when i setting the dataprovider property of the datagrid, it displays the content exactally what i expeceted.
but the widht of the collumns are based on the content of the dataprovider, i am not able to see the full collumn name in the datagrid's header. I want to display the full collumn name to the users without setting the collumn width explicitly because the data are dynamically returned from the server. could you pls give me some ideas to acheive this...?
Thanks in advance.

Hi Karthikeyan Subramain,
You can make use of typicalItem proberty to set the column width.
Here is the link for sample code which uses typicalItem:
http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-dat agrids-columns-with-a-typicalitem/
Hope this will help you
Thanks and Best regards,
Pooja Kuber | [email protected] | www.infocepts.com

Similar Messages

  • What is the point of [Bindable("selectionChange")] in parts of the spark datagrid class?

    I dont understand the point of this code in the spark datagrid class:
    what is the point of this:
        [Bindable("selectionChange")]
         [Bindable("valueCommit")]
         [Inspectable(category="General", defaultValue="null")]
    in
        //  selectedItem
        [Bindable("selectionChange")]
        [Bindable("valueCommit")]
        [Inspectable(category="General", defaultValue="null")]
         *  @copy spark.components.Grid#selectedItem
         *  @default null
         *  @langversion 3.0
         *  @playerversion Flash 10
         *  @playerversion AIR 2.5
         *  @productversion Flex 4.5
        public function get selectedItem():Object
            if (grid)
                return grid.selectedItem;
            return (dataProvider && (selectedIndex > 0)) ?
                dataProvider.getItemAt(selectedIndex) : undefined;
         *  @private
        public function set selectedItem(value:Object):void
            if (grid)
                grid.selectedItem = value;
            else
                var f:Function = function(g:Grid):void
                    g.selectedItem = value;
                deferredGridOperations.push(f);

    Anything that is binding to selectedItem will go get the value again when either of those events fires.

  • Playing with the spark datagrid

    I'm Playing with the spark datagrid and have a column set up like so:
    <GridColumn  width="140" headerText="Margin" headerText.editMode="Margin (editing)" dataField="margin" editable="false"  editable.editMode="true" itemRenderer="gridColumnRenderer" >
               </GridColumn>
    I would like the item render to change colour based on the state of the outerDocuent, is this possible?
    I tried this but can't get to the outerdocument
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    autoDrawBackground="true">
        <s:Label text="{data.margin}" backgroundColor="{   outerDocument.currentState =='editMode'?0xffffff:0xdddddd}"/>
    </s:ItemRenderer>

    I believe you will need to use GridItemRenderer instead of ItemRenderer as your base class for renderers in the spark DataGrid.  Does it work if you change to that?

  • How to findout the clearning document number based on the reference

    Hi all
    we  need to findout the clearning document number based on the reference number in financial transaction code.
    basically we know how to retrieve the data from table level using BKPF without non primary key as XBLNR but
    we  want to know is this any function module to retrieve the document number based on the reference number like XBLNR.
    Please confirm.
    Thanks
    K.Gunasekar

    you can get it from BSAD too. but again its not a primary key

  • How to create a service entry sheet based from the PO

    how to create a service entry sheet based from the PO
    Gurus,
    I am creating a service entry sheet from the PO but I am getting an error of u201CPlease maintain services or limits Message no. SE029- Diagnosis(You cannot enter data until the PO item has been maintained correctly) u201C
    The document type of the PO is standard NB, account assignment category is Q- (Proj make to order) and the item category is D(service). Then I am trying also create a PR using account assignment category is Q- (Proj make to order) and the item category is D(service) but still cannot proceed, a message asking me to enter a service entry number. What I know the process is create a PO(maybe based from PR) then post the GR then create a service entry sheet in ML81N but I cannot proceed. Just creating a PR or PO using those mentioned account assignment and item category and getting an error of need to enter a service entry sheet number.
    Please help.thanks!

    HI,
    Process for Creating Service Entry Sheet
    Transaction Code :    ML81N
    1)To open the respective Purchase Order, Click on the u2018Other Purchase Orderu2019, then enter the Purchase Order No.
    2)Click on the u2018Create Entry Sheetu2019 icon(3rd Icon on Top-Left)
    3)Give Short Text (e.g. R/A Bill No. 1) and top service entry sheet number also generated.
    4)Click u2018Service Selectionu2019 Icon on the Bottom of the Screen.
    5)For the 1st Time, when we are making Service Entry Sheet for a respective Purchase Order, we need to u201CAdopt Full Quantityu201D by clicking the Check box next to it, then Enter.  (*For the next time, no adoption is required, just continue)
    6)Select the respective Services by clicking on the Left Hand Side, then Click u2018Servicesu2019 (Adopt services) icon on the Top.
    7)Give the completed Quantity, then Click u2018Acceptu2019 icon(a green flag on the top)
    8)Save .
    9)Service Entry Sheet is SAVED and account posting made.
    Hope, it is useful for you,
    Regards,
    K.Rajendran

  • How to find bpel instance in 11g based on the index values

    We have 10g BPEL process where we define 4 index values for all the instances. Whenever support request comes, we ask index values and based on that we search the process instance.
    We have migrated this 10g bpel process to 11g now. How to find bpel instance in 11g based on the index values ???

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to determine the length of variable based on the character contents

    Hi Experts,
    I need to determine the length of variable based on the character contents I am looking for.
    Example;
        lv = 'FENCE - Construction bond'
    Where I need to know the exact field length of 'FENCE -'.
    It's possible that variable will have different values in different lengths.
    Thanks.
    Kath

    Kathy Amion  ,
    hello Will you please elaborate ...!
    The suggestion for your proble as i understood it is you will have to split the string at seperator '-' in two say variable name and conten. and then  you will calculate the length of the VARIable name by using string function.

  • Fetch the operating unit name based on the country name

    Hi all,
    I want to fetch the operating unit name based on the country name, there is no link between fnd_territories(_tl) and hr_all_organization_unis(_tl) tables.
    Can any one know how to get this thing.
    any help or idea is appreciable.
    Thanks,
    Giri

    Giri,
    I don't think you will find such a link. One country can be used by multiple operating units.
    Hope this helps,
    Sandeep Gandhi

  • What is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.

    Hello Gurus,
    I want to know what is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.
    For example:
    X=EssVCalculate("Sheetname","Calc_Script name",True)
    In the above code instead of the *"Calc_Script name"* I want a script which is called dynamically and the values are calculated accordingly.
    Thanks in advance
    Saurabh

    Hi Todd,
    This is the situation:
    I have a calc script in Essbase which I can call to perform the calculations on the current sheet that is retrieved. I want calculation for the following formulas:
    x = EssVCalculate("Sheet2", "CalcBC", False)
    CalcBC is my calc script which is present in Essbase
    So instead of passing the above script I want to pass the conditions dynamically in the VBA code . I don't want to mention the script name directly in EssVCalculate option
    For example:
    I have three drop down menus from which I would select three different( zero level )members. It would then retrieve the data for that particular values in the excel sheet and now when I click on Calculate button it should calculate the script dynamically.
    I don't know how calc scripts can be executed dynamically in the VBA code itself.
    Thanks in Advance
    Saurabh

  • How to include a custom bkgd in the spark datagrid header

    I have a CustomDatagridSkin.mxml, which is based upon the default DataGrid.
    I'm looking at the code, and I'm a noob, trying to make heads or tails out of it. If I could just figure out how to change the header color I would be happy. But what I'd really like to know is how to apply a graphic to the background of the header.
    Is there some example on the net that I can follow, because I'm having a hell of a time finding something useful.
    The demo that Deepa had was awsome (corkboard and postit notes looking thing).
    How was that done?
    Thanks
    Kristin

    Hi,
    Do you want a custom background for the entire header bar? or for each individual header renderer? I would take a look at the DefaultGridHeaderRenderer class to see how we do headers. These header renderers are used by the GridColumnHeaderGroup to create the column headers. You can modify it to have your own custom background graphic. If you just want to tweak the color, you can apply the chromeColor style to the DataGrid.
    I can try to cook up an example for you when I have a bit of time, but not at the moment. Hope this points you in the right direction.
    -Kevin

  • How to filter a spark datagrid using a checkbox?

    Hi i want to know how can i filter a spark datagrid using  a check. I have a column by the name status on the datagrid, which can be active or inactive. When i check the checkbox i should be able to see all the records and when i uncheck it i should only be able to see all the records with the status ACTIVE...

    Then, try to add another attribute in your SELECT VO statement, which truncates the original date_and_time field:
       SELECT.... TRUNC(DATE_AND_TIME) as truncated_dateAfter that, put reference to that attribute in the filter facet, as follows
             <f:facet name="filter">
                      <af:inputDate value="#{vs.filterCriteria.TruncatedDate}" id=.../>
             </facet>Do not forget to add the TruncatedDate attribute in the <tree...> binding in the pageDef, along with others VO attributes. Do that manually.

  • How to update the Sent Idoc Status based on the Response From Webservice

    Hi All,
    I have to develop Idoc--SOAP Sync Process Scenario Using BPM .
    I have configured every thing using BPM and mapped
    MATMAS----SOAP Request
    SOAP Resp----STATUS.SYSTAT01
    In R/3  the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.
    I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .
    I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.
    How can we make the status of the Idoc based on some response Text
    iam unable to follow OR not able to clear my self on this.
    Please suggest me or give some over view kind of thing on this
    Regards

    Hi Suman,
    It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."
    So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).
    now go in this way:
    you can develop all the message Interfaces  of  Abstract catagory (not manditory )
    MI_AA_MATMAS   -> Abstract Asynchronous message    interface for your Matmas IDOC
    MI_AS_SOAP_ReqandResp  -> Abstarct Syncronous MI for SOAP request and response.
    MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc
    MI_AA_SOAP_Req ->  Abstarct Asyncronous MI for SOAP request .
    MI_AA_SOAP_Res ->  Abstarct Asyncronous MI for SOAP response .
    Thats all in Message interface.
    your first reciever :
    (This will receive the message asynchronously from R/3)
    create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS
    Now in thw Propert TAB of this step: give this message name.
    Step2: Synchronous call :
    create container Variable psoaprequest and psoapresponse  give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req  resp.
    Now in thw Propert TAB of this step:
    Synchronous Interface : MI_AS_SOAP_ReqandResp
    Request Message : psoaprequest
    Response Message: psoapresponse
    Transformation Step :
    Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS
    Let's name it as IM_ResandMatmasToStatus
    create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.
    In Property pan of this step :
    Interface mapping :IM_ResandMatmasToStatus
    Source Message :psoapresponse
                                preceive
    (IT will ask you for two source messages as IM selected in this transformation has 2 source messages)
    Target Message :pstatus
    Send step:
    Select a message as pstatus.
    thats all in IR.
    If have doubt in ID just let me know.
    Thanks
    Sunil Singh

  • How to find bpel instance in 11g based on the index values using Java APIs

    Hi ,
    In SOA10G we had option to find the instances based on the index value using Java APIs like below.
    WhereCondition criteria= new WhereCondition(SQLDefs.CX_index_1 + " = ?");
    criteria.setString(1, "indexValue");
    Locator mLoc = getLocator();
    IInstanceHandle[] foundInstances = mLoc.listInstancesByIndex(criteria);
    Please tell me how to achieve the same functionality in SOA 11G using Java APIs
    Regards,
    Saba

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • How do  we check the check box items based on the databse fields.

    Hi All,
    I have a requirement like as mentioned below#
    1. I have a combox box whcih i will be populated from database.
    2. I have created two check box as "Stategric " and "Non Stategric".
    3. Now when i select the combox box condition i need to select the check box items.
    4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
    5. How do i need to map the database point of view and correlacte with javascript pont of view.
    6. Do we need to write any Application process to achieve this task and who we can do that.
    Thanks,
    Anoo..

    Hi VC,
    As per my understanding the code should be placed between --.
    Based on this i have placed the code
    function setCheckbox(pThis, pItem){
    alert('inside');
        var l_code = '';
        // Get checkbox name
        rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
    alert("The value is"+rName);
        // Fire AJAX
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
        get.add('F120_COMPANY',pThis.value);
        gReturn = get.get('XML');
        if (gReturn) {
          var values = gReturn.getElementsByTagName('value');
          var messages = gReturn.getElementsByTagName('message');
          // Build the checkbox
          for (i=0; i<values.length; i++) {
            var rValue = values.firstChild.nodeValue;
    var rMessage = messages[i].firstChild.nodeValue;
    l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
    l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
    document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
    Correct me if iam understanding is wrong.
    Thanks,
    Anoo..
    Edited by: Anoo on May 31, 2012 11:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Sequential dates in new numbers 3.0 does it still do it??

    sequential dates in new numbers 3.0 does it still do it?? Hi Gang, Happy New Year. I am attempting to add sequential dates into my budget planner for the new year. I know the old one could do it. I can do sequential numbers in 3.0, just not able to d

  • Adobe Media Encoder CC and CS6 crash on startup.

    Adobe Media Encoder crashes because it tries to load a bunch of After Effects plugins that it has in common, which it has no business dabbling in. The last thing I see before it crashes is Twixtor. How do I prevent this?

  • [4.0] Junk characters in TNS list

    Hi All, first of all let me thank all the developers that worked on SQL Developer (especially the fourth version), because it is a great product, improving continuously! The (small) problem I have on SQL Developer 4.0 is that it shows me junk charact

  • Color Profiles

    When I need to get a photo book printed from an online photo book printer, I first have to rasterize all of my pages from InDesign. To do this I export a high res PDF and then rasterize each page in photoshop. My question is about the sRGB color spac

  • Populate target table with default value

    I have a query like this: SELECT 0 AS ID, 9999999999 AS CODE FROM DUAL UNION ALL SELECT VEH.TP_ID AS ID, VEH.VEH_ID AS CODE FROM TB_VEHICLE; So I have an interface with two data sets, one for each query. The first data set represents the "select from