Text in Data Grid ItemRenderer overlapping cells

I have created a dataGrid itemRenderer and it is overlapping onto other cells. I've created several dataGrids and itemRenderers before and I've never had this happen so I'm a bit perplexed. My itemRenderer looks like this:
<s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                  xmlns:s="library://ns.adobe.com/flex/spark"
                                  xmlns:mx="library://ns.adobe.com/flex/mx"
                                  focusEnabled="true" height="25">
    <s:layout>
        <s:HorizontalLayout/>
    </s:layout>
    <fx:Script>
        <![CDATA[
            [Bindable]
            private var showLock:Boolean = false;
            [Embed(source="/assets/images/icons/padlock.png")]
            [Bindable]
            public var padLock:Class;
             * If items have a testLabType then they are locked.
            override public function set data(value:Object):void{
                if(value != null){
                    super.data = value;
                    if(value.testLabType){
                        showLock = true;
        ]]>
    </fx:Script>
    <s:HGroup verticalAlign="middle" height="25">
        <s:BitmapImage source ="{padLock}" visible="{showLock}" width="16" height="17" smooth="true"/>
        <s:Label id="lblData" text="{listData.label}" styleName="normal11ptDroidSans" lineBreak="toFit"/>
    </s:HGroup>
</s:MXAdvancedDataGridItemRenderer>
I've also attached this image so you can see what I'm referring to:

I think you need to set the Hgroup and Label's width based on the main tag's
explicitWidth

Similar Messages

  • Text in data grids doesn't display

    With the new 29 version of FireFox, data grids on our site don't seem to display the data in the grids any longer. When using Chrome or IE11, these still show just fine. Version 28 and earlier worked great. The menu system in our site doesn't work well any longer either using version 29.
    What we are seeing on this site was also seen with IE11 when it first came out but that was easily fixed by just using the "compatability" settings in IE11 and adding our site to the list of compatible sites. There isn't such a setting in FireFox so I wonder how we go about getting around this.

    Thanks for the offer but we no part of this site can be publicly accessed. The thought of a font causing the problem doesn't make much sense to me because it was working fine prior to version 29. Why would the font all of a sudden be causing the problem. Furthermore, it isn't just text in data grids but the menu system we use doesn't work properly either. You have to hold down on the left mouse button to use the menu and then when you are on the item you want to select, let off the left mouse button. Guess our only option is to start recommending Chrome or IE.

  • How do I take data from a data grid and put it into a variable?

    I am having problems taking data from a datagrid (guess you got that from the title) and setting it to a variable. I am tak
    ing the data from 3 different rss feeds, depending on what button you press, and showing it in a grid. I would like to be able to do more with this data. Here is my code so far:
    <mx:VBox id="vbox" x="70" y="150">
      <mx:Label text="This Data Grid is doing nothing" />
      <mx:DataGrid width="1000" dataProvider="{fullXML}">
       <mx:columns>
        <mx:DataGridColumn id="dataGrid" *dataField="channel.description" headerText="Feed"/>
       </mx:columns>
      </mx:DataGrid>
    </mx:VBox>
    <!-- from test 5 -->
    <mx:Move id="moved" target="{hbox}" repeatCount="0" easingFunction="mx.effects.easing.Linear.easeIn" />
    <mx:HBox id="hbox" fontSize="12" fontFamily="courier">
      <mx:Label text="{website**}" />
    </mx:HBox>
    * this is the data I want to get out
    ** this is where I want to be able to put the variable.
    I don't know if I can do it here or if I need a function or what.
    I would like to be able to put it into an array, but step one is anything at all, so I'm trying just a variable.

    Where do I put that line of code? I see that it goes at the Script part near the top, but how can I use that, I am pretty new to this language. I am not familiar with this line, where does it bind the value from the datagrid to the variable?
    fullXML[myDataGrid.selectedIndex].FIELD_NAME;
    myDataGrid would be the id from the grid I am guessing?
    and selected index would be the channel.description part?
    and FIELD_NAME; is the variable name?
    does this go into a funtion or is it placed at the top where the variables are declared?

  • Data Grid Dynamic Cell Colors

    I would like to create a Data Grid where the individual cell
    colors change based on the number in the cell.
    For example, numbers between 0 and 1 would be green, between
    1 and 2 would be yellow, and between 3 and 4 would be red.
    I am wondering if this is even possible, or if I am going to
    have to find another solution other than the data grid component.
    Not looking for a complete answer (but I'd be happy to have
    one!) but any pointing in the right direction would be great.
    I have a lot of data and coloring the cells by hand is not an
    option. I don't even know if I can change individual cell colors in
    the data grid- if it isn't possible I'd be willing to change the
    text color instead.
    Any suggestions?
    Thanks!

    Example query:
    select cust.*
    , case when credit_limit > 5000 then 'red' else 'green' end as bg_color
    from (
    select
    CUSTOMER_ID,
    CUST_FIRST_NAME,
    round(dbms_random.value(1000,9000)) as CREDIT_LIMIT
    from #OWNER#.DEMO_CUSTOMERS
    ) custIn the Column Definition of CREDIT_LIMIT, set the HTML-Expression to &lt;div style="background-color:#BG_COLOR#">#CREDIT_LIMIT#&lt;/div>
    See result : http://apex.oracle.com/pls/apex/f?p=41715:3
    You could also construct the whole html in the SQL but I like to divide logic (SQL) and UI.
    Another option could be to create a Dynamic Action (After Refresh of the report region) and create a combination of a nifty selector and piece of JavaScript, but I guess this is easier.

  • How to make specific cell(s) read-only in a data-grid

    Hi there!
    Is there a way to make an specific cell read-only in a data-grid?
    Best regards,
    Ciro

    Hi !
    After some months... here is the solution:
    Private WithEvents _gridTaste As DataGrid
    Private Sub MyScreen_Created()
    AddHandler FindControl("GridTaste").ControlAvailable,
    Sub(s, e)
    _gridTaste = CType(e.Control, DataGrid)
    End Sub
    End Sub
    Private Sub _gridTaste_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs) Handles _gridTaste.BeginningEdit
    ' I want do set the cell (2,0) as read only:
    If e.Row.GetIndex = 2 AndAlso e.Column.DisplayIndex = 0 Then
    e.Cancel = True
    End If
    End Sub
    I hope this post help you too!
    Best regards,
    Ciro

  • Validation Error Message of a data grid cell

    Hi,
    The validation error message of a cell of data grid does not
    appear around that cell but far away. How can I force the error
    message to be around the cell as it should be?
    Best regards
    Dr. Khaled

    Hi,
    You have to use OADailogue region to achieve this. Please follow below code units to create a dialogue page and display an error message.
    OADialogPage dialogPage = new OADialogPage(OAException.WARNING, message, null, "", "");
    String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
    String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
    dialogPage.setOkButtonItemName("DeleteYesButton");
    dialogPage.setNoButtonItemName("DeleteNoButton");
    dialogPage.setOkButtonToPost(true);
    dialogPage.setNoButtonToPost(true);
    dialogPage.setRetainAMValue(true);
    dialogPage.setPostToCallingPage(true);
    dialogPage.setOkButtonLabel(yes);
    dialogPage.setNoButtonLabel(no);
    java.util.Hashtable formParams = new java.util.Hashtable(1);
    formParams.put("foo","value");
    dialogPage.setFormParameters(formParams);
    pageContext.redirectToDialogPage(dialogPage);
    Thanks
    Bharat

  • Display image into Data Grid

    Hello,
    I have to display into a data grid, in Flex 2, 2 columns:
    first column ( "Images") must contain a picture with an object and
    second column (" quantity") must contain the amount of that object
    that I want to buy. The problem is that I must take the name of the
    image from an .xml file, specified like this:
    <mx:DataGrid id="obj" dataProvider="{ObjList}" > where
    ObjList is the .xml file with <name/>
    <picture_address/> etc.
    The second column must contain a textbox so I can input a
    number of items for each picture ( can be also a combobox where
    from I can select some value, from 1 to 20 for example).
    I've searched the Internet and I haven't found a solution
    yet. Please give me a link or a solution for this problem.
    Tudor

    use itemrenderes.... the example below shows how to add an
    image.... you can do the same thing with a text box or combo box
    <mx:DataGridColumn width="10" headerText="Image">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Canvas width="100%" height="100%">
    <mx:Image verticalCenter="0" horizontalCenter="0"
    source="{data.picture_adress}""/>
    </mx:Canvas>
    </mx:Component>
    </mx:itemRenderer>

  • Really Urgent: List with Data Grid  rowcount issue i added the full code below

    Thanks in advance
    Exactly wat i need is
    1.if i click the open button want to visible all datagrid ,its working perfectly.
    2.if i click the close button want to close all data grid ,its working perfectly.
    3. if i click a particular  list means want to visible particular datagrid..some times working good but some times not visible ...
    4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
    if u cont get clearly please copy the below code and check it.....i think there is row count not working properly...any other way to solve this problem?.......
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
    <fx:Declarations>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var ArrUserList:ArrayCollection;
    [Bindable]
    public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
    {label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
    public var loc_first_last_name:String;
    function Load():void
    ArrUserList=Find_Duplicate(listDB);
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    function Clink_lnk_open():void
    if(lnk_open.label=="Open")
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=1;
    lnk_open.label="Close";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    else
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    lnk_open.label="Open";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    function Click_UserName1(event:MouseEvent,data:Object):void
    loc_first_last_name=event.currentTarget.text;
    var str:String;
    for(var i:int=0; i<ArrUserList.length; i++)
    str=ArrUserList[i].label;
    if(loc_first_last_name==str)
    if(ArrUserList[i].click == 0)
    ArrUserList[i].click=1;
    else
    ArrUserList[i].click=0;
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
    var res_arr:ArrayCollection=new ArrayCollection();
    var flag:Boolean;
    for(var i:int=0;i<test_arr.length;i++)
    var j:int=0
    flag=false;
    for(;j<res_arr.length;j++)
    if(res_arr[j].label==test_arr[i].label)
    res_arr[j].dataCollection.addItem(test_arr[i]);
    flag=true;
    break;
    if(!flag)
    var myItem:Object = new Object() ;
    myItem.label=test_arr[i].label;
    myItem.dataCollection=new ArrayCollection();
    myItem.dataCollection.addItem(test_arr[i]);
    res_arr.addItem(myItem) ;
    return res_arr;
    ]]>
    </fx:Script>
    <s:Scroller id="id_scroller" width="100%" height="100%">
    <s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10"   width="100%" height="100%" >
    <mx:VBox width="850" paddingLeft="0" paddingTop="1"    color="black"  backgroundColor="#FFFFFF">
    <mx:HBox width="850" left="50" paddingBottom="3"  paddingLeft="5" backgroundColor="#6D6C6C"   paddingTop="3" color="#FFFFFF" >
    <mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
    <mx:Button id="load_btn" label="Load" click="Load()"/>
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850"   horizontalScrollPolicy="off" verticalScrollPolicy="off"  >
    <mx:List variableRowHeight="true"   width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off"  horizontalScrollPolicy="off"
    buttonMode="true"  >
    <mx:itemRenderer>
    <fx:Component>
    <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    override public function set data(value:Object):void
    super.data = value;
    Membership_Grid.dataProvider=data.dataCollection;
    Membership_Grid.rowCount=data.dataCollection.length;
    lbl_userhead.text=data.label;
    lbl_userhead1.text=data.dataCollection.length+" Datas";
    if(data.click==1)
    Vbox_main.visible=true;
    Vbox_main.includeInLayout=true;
    else
    Vbox_main.visible=false;
    Vbox_main.includeInLayout=false;
    Membership_Grid.validateNow() ;
    ]]>
    </fx:Script>
    <mx:HBox id="vbox_grid"  horizontalScrollPolicy="off"  height="25" verticalScrollPolicy="off" width="850"  paddingLeft="10" paddingTop="5"  backgroundColor="#6D6C6C" color="#FFFFFF">
    <s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true"   width="250"  paddingTop="3" />
    <s:Label id="lbl_userhead1"  buttonMode="true"   width="548" paddingTop="3" />
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off"  visible="false" includeInLayout="false" >
    <mx:DataGrid id="Membership_Grid"   alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"  rowHeight="25" width="850"  borderSkin="{null}"
    borderVisible="false" >
    <mx:columns>
    <mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
    <mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
    <mx:DataGridColumn width="150" headerText="Day" dataField="day" />
    <mx:DataGridColumn width="150" headerText="Date"  dataField="date"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:VBox>
    </fx:Component>
    </mx:itemRenderer>
    </mx:List>
    </mx:VBox>
    </mx:VBox>
    </s:VGroup>
    </s:Scroller>
    </s:Group>

    Hi,
    You already wrote the same exact post 4 times! Don't you think it's enough?
    May 12 : http://forums.adobe.com/message/3672269#3672269
    May 20 : http://forums.adobe.com/message/3690500#3690500
    May 23 : http://forums.adobe.com/message/3696874#3696874
    May 25 : http://forums.adobe.com/message/3701649#3701649
    If you want someone help you, from my point of view it surely not the right way of doing, especially by writing Really Urgent. It just annoys people (and btw it seems not to be so urgent as you stay with it since the May12). If you want a "urgent" answer, hire a Flex expert or just be patient.
    Kind regards,
    Mich

  • Flex List with data-grid issue any body can help me ......i added the full code below

    Thanks in advance
    Exactly wat i need is
    1.if i click the open button want to visible all datagrid ,its working perfectly.
    2.if i click the close button want to close all data grid ,its working perfectly.
    3. if i click a particular  list means want to visible particular datagrid..some times working good but some times not visible ...
    4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
    if u cont get clearly please copy the below code and check it.......any other way to solve this problem?.......
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
    <fx:Declarations>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var ArrUserList:ArrayCollection;
    [Bindable]
    public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
    {label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
    public var loc_first_last_name:String;
    function Load():void
    ArrUserList=Find_Duplicate(listDB);
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    function Clink_lnk_open():void
    if(lnk_open.label=="Open")
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=1;
    lnk_open.label="Close";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    else
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    lnk_open.label="Open";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    function Click_UserName1(event:MouseEvent,data:Object):void
    loc_first_last_name=event.currentTarget.text;
    var str:String;
    for(var i:int=0; i<ArrUserList.length; i++)
    str=ArrUserList[i].label;
    if(loc_first_last_name==str)
    if(ArrUserList[i].click == 0)
    ArrUserList[i].click=1;
    else
    ArrUserList[i].click=0;
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
    var res_arr:ArrayCollection=new ArrayCollection();
    var flag:Boolean;
    for(var i:int=0;i<test_arr.length;i++)
    var j:int=0
    flag=false;
    for(;j<res_arr.length;j++)
    if(res_arr[j].label==test_arr[i].label)
    res_arr[j].dataCollection.addItem(test_arr[i]);
    flag=true;
    break;
    if(!flag)
    var myItem:Object = new Object() ;
    myItem.label=test_arr[i].label;
    myItem.dataCollection=new ArrayCollection();
    myItem.dataCollection.addItem(test_arr[i]);
    res_arr.addItem(myItem) ;
    return res_arr;
    ]]>
    </fx:Script>
    <s:Scroller id="id_scroller" width="100%" height="100%">
    <s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10"   width="100%" height="100%" >
    <mx:VBox width="850" paddingLeft="0" paddingTop="1"    color="black"  backgroundColor="#FFFFFF">
    <mx:HBox width="850" left="50" paddingBottom="3"  paddingLeft="5" backgroundColor="#6D6C6C"   paddingTop="3" color="#FFFFFF" >
    <mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
    <mx:Button id="load_btn" label="Load" click="Load()"/>
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850"   horizontalScrollPolicy="off" verticalScrollPolicy="off"  >
    <mx:List variableRowHeight="true"   width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off"  horizontalScrollPolicy="off"
    buttonMode="true"  >
    <mx:itemRenderer>
    <fx:Component>
    <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    override public function set data(value:Object):void
    super.data = value;
    Membership_Grid.dataProvider=data.dataCollection;
    Membership_Grid.rowCount=data.dataCollection.length;
    lbl_userhead.text=data.label;
    lbl_userhead1.text=data.dataCollection.length+" Datas";
    if(data.click==1)
    Vbox_main.visible=true;
    Vbox_main.includeInLayout=true;
    else
    Vbox_main.visible=false;
    Vbox_main.includeInLayout=false;
    Membership_Grid.validateNow() ;
    ]]>
    </fx:Script>
    <mx:HBox id="vbox_grid"  horizontalScrollPolicy="off"  height="25" verticalScrollPolicy="off" width="850"  paddingLeft="10" paddingTop="5"  backgroundColor="#6D6C6C" color="#FFFFFF">
    <s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true"   width="250"  paddingTop="3" />
    <s:Label id="lbl_userhead1"  buttonMode="true"   width="548" paddingTop="3" />
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off"  visible="false" includeInLayout="false" >
    <mx:DataGrid id="Membership_Grid"   alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"  rowHeight="25" width="850"  borderSkin="{null}"
    borderVisible="false" >
    <mx:columns>
    <mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
    <mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
    <mx:DataGridColumn width="150" headerText="Day" dataField="day" />
    <mx:DataGridColumn width="150" headerText="Date"  dataField="date"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:VBox>
    </fx:Component>
    </mx:itemRenderer>
    </mx:List>
    </mx:VBox>
    </mx:VBox>
    </s:VGroup>
    </s:Scroller>
    </s:Group>

    Hi
    Sir am using flex 4.0.1     SDKS 4.1.0....
    Still i cont fix this problem....i have the same prob in many mxml files .any alternate solution for my prob pls let me know...
    Thanks in Advance,
    senthil.

  • Advanced data grid cannot convert renderers::ItemGroupRenderer to mx.controls.listClasses.IListIte

    I'm getting an error in my advanced data grid when doing this:
    cannot convert renderers::ItemGroupRenderer to mx.controls.listClasses.IListItemRenderer.
      <mx:rendererProviders>
                    <mx:AdvancedDataGridRendererProvider id="refRP1"  columnSpan="24" depth="1" renderer="{new ClassFactory(ItemGroupRenderer)}">
                    </mx:AdvancedDataGridRendererProvider>
                </mx:rendererProviders>
    The :ItemRenderer:
    <?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/halo" width="400" height="300">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:SkinnableContainer>
            <s:HGroup>
                <s:Label text="3">
                </s:Label>
            </s:HGroup>
        </s:SkinnableContainer>
    </s:ItemRenderer>
    any ideas?

    Thanks, if I do this I get an error: 'HBox' declaration must be contained within the <Declarations> tag since it does not implement
    'mx.core.IUIComponent'.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:AdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/halo" width="400" height="300">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                /* override public function set data(value:Object):void
                    var currencyFormatter:CurrencyFormatter=new CurrencyFormatter();
                    currencyFormatter.precision=2;
                    currencyFormatter.currencySymbol='';
                    if (value != null)
                        numberOfItems.text = value.totalTransfers + ' items';
                        notionalAmount.text = currencyFormatter.format(value.totalNotional)+ ' Notional amount';
                        numberUnmatched.text = new Number(value.totalUnmatched) >0? value.totalUnmatched + ' Unmatched':'';
            ]]>
        </fx:Script>
        <mx:HBox  height="18" backgroundColor="#B0D9FF" horizontalScrollPolicy="off">
            <mx:Text text="Text" width="94" id="numberOfItems" color="#000A8A"/>
            <mx:VRule height="100%"/>
            <mx:Text text="Text" width="291" id="notionalAmount" color="#000a8a"/>
            <mx:VRule height="100%"/>
            <mx:Text text="Text" id="numberUnmatched" width="103" color="#000a8a"/>
        </mx:HBox>
    </mx:AdvancedDataGridItemRenderer>

  • Data grid headers

    I can align text in the body cells of a data grid (using cell
    renderer ) but not the headers( tried to use header Renderer). I
    can format the styles of all cells incuding headers. Any
    ideas?

    Everything you need to know about styling components:
    http://www.flashgods.org/forums/viewtopic.php?f=20&t=76

  • ALV Grid Drag & Drop - Cell-specific

    Hi ABAPers,
    I've referred SAP Standard program / SDN forum and got some logic for ALV Drag & Drop for row-specific, Column-specific and for Trees. But I didn't get for Cell-specific.
    My requirement is :
    If the user drags a particular cell to another cell in an ALV-grid, then that Cell value should be copied to the 'Dropped-Cell' in the ALV Grid and should be saved to that particular Internal Table.I have referred the SAP standard program BCALV_DND_03 which does from a different tree to a cell. My requirement is from the same ALV grid Table.
    I've also referred BCALV_DND_04 which is useful. But here, it does it for the whole row.
    Can anyone please help me in this?
    Thanks a lot.
    Best Regards,
    Sowmya

    TOP INCLUDE:
    DATA: BEGIN OF g_t_plan_alv_m OCCURS 0,
             header,
             count(5).
            INCLUDE STRUCTURE g_ze6spw_plan_alv.
    DATA:    handle_style         TYPE lvc_t_styl,
             handle_dragdrop      TYPE lvc_t_drdr,
             tabcolor             TYPE lvc_t_scol.
    DATA: END OF g_t_plan_alv_m.
    CLASS cl_gui_resources DEFINITION LOAD.
    CLASS lcl_events_dragdrop DEFINITION DEFERRED.
    DATA:
         BEGIN OF g_ty_s_outtab OCCURS 0,
           header,
             count(5).
            INCLUDE STRUCTURE g_ze6spw_plan_alv.
    DATA:     handle_style         TYPE lvc_t_styl,
             handle_dragdrop      TYPE lvc_t_drdr,
             tabcolor             TYPE lvc_t_scol,
           END   OF g_ty_s_outtab.
    DATA: g_field TYPE lvc_fname.
    DATA:
          gr_events              TYPE REF TO lcl_events_dragdrop,
          gr_dragdrop            TYPE REF TO cl_dragdrop,
          gr_dragdrop_background TYPE REF TO cl_dragdrop.
    CLASS lcl_events_dragdrop DEFINITION.
      PUBLIC SECTION.
        DATA: m_grid TYPE i.
        METHODS:
         ondrag               FOR EVENT ondrag
                              OF cl_gui_alv_grid
                              IMPORTING e_row
                                        e_column
                                        es_row_no
                                        e_dragdropobj,
         ondrop               FOR EVENT ondrop
                              OF cl_gui_alv_grid
                              IMPORTING e_row
                                        e_column
                                        es_row_no
                                        e_dragdropobj,
         ondropcomplete       FOR EVENT ondropcomplete
                              OF cl_gui_alv_grid
                              IMPORTING e_row
                                        e_column
                                        es_row_no
                                        e_dragdropobj,
         ondropgetflavor      FOR EVENT ondropgetflavor
                              OF cl_gui_alv_grid
                              IMPORTING e_row
                                        e_column
                                        es_row_no
                                        e_dragdropobj
                                        e_flavors.
    ENDCLASS.                    "LCL_DRAGDROP DEFINITION
    *       CLASS lcl_dragdrop_obj DEFINITION
    CLASS lcl_dragdrop_obj DEFINITION.
      PUBLIC SECTION.
        DATA: line  LIKE g_ty_s_outtab,
              index TYPE i.
    ENDCLASS.                    "lcl_dragdrop_obj DEFINITION
    CLASS lcl_events_dragdrop IMPLEMENTATION.
      METHOD ondrag.
        PERFORM event_ondrag USING e_row
                                   e_column
                                   e_dragdropobj.
      ENDMETHOD.                    "ondrag
      METHOD ondrop.
        PERFORM event_ondrop USING e_row
                                   e_column
                                   e_dragdropobj.
      ENDMETHOD.                    "ondrop
      METHOD ondropcomplete.
        PERFORM event_ondropcomplete USING e_row
                                           e_column
                                           e_dragdropobj.
      ENDMETHOD.                    "ondropcomplete
      METHOD ondropgetflavor.
        PERFORM event_ondropgetflavor USING e_row
                                            e_column
                                            es_row_no
                                            e_dragdropobj
                                            e_flavors.
      ENDMETHOD.                    "ondropgetflavor
    ENDCLASS.  "LCL_objdragdropapp IMPLEMENTATION
    FORM set_drag_drop.
      DATA:  l_effect                     TYPE i,
             l_dragdrop_handle            TYPE i,
             ls_dragdrop                  TYPE lvc_s_dd01,
             ls_drag_cell                 TYPE lvc_s_drdr,
             lt_drag_cells                TYPE lvc_t_drdr,
             ls_fcat                      TYPE lvc_s_fcat,
             l_field                      TYPE lvc_fname,
             l_source                     TYPE char1,
             l_target                     TYPE char1,
             l_alv_exclude_tab            TYPE ui_functions,
             l_variant                    TYPE disvariant.
      FIELD-SYMBOLS: <fs_brcp>  TYPE zreceipt,
                     <fs_bisu>  TYPE z_supply.
      CREATE OBJECT gr_dragdrop.
      CREATE OBJECT gr_dragdrop_background.
      CREATE OBJECT gr_events.
      SET HANDLER gr_events->ondrag
                  FOR g_plan_alv.
      SET HANDLER gr_events->ondrop
                  FOR g_plan_alv.
      SET HANDLER gr_events->ondropcomplete
                  FOR g_plan_alv.
      SET HANDLER gr_events->ondropgetflavor
                  FOR g_plan_alv.
      LOOP AT g_t_plan_alv_m.
        MOVE-CORRESPONDING g_t_plan_alv_m TO g_ty_s_outtab.
        APPEND g_ty_s_outtab.
      ENDLOOP.
      l_effect = cl_dragdrop=>move + cl_dragdrop=>copy.
      CALL METHOD gr_dragdrop->add
        EXPORTING
          flavor     = 'Line'                                   "#EC NOTEXT
          dragsrc    = c_on
          droptarget = c_on
          effect     = l_effect.
      CALL METHOD gr_dragdrop->get_handle
        IMPORTING
          handle = l_dragdrop_handle.
      ls_dragdrop-cntr_ddid = l_dragdrop_handle. "auch bei leerem Grid
      ls_dragdrop-grid_ddid = space.
      ls_dragdrop-col_ddid  = space.
      ls_dragdrop-row_ddid  = space.
      ls_dragdrop-fieldname = 'HANDLE_DRAGDROP'.
      g_plan_layo-s_dragdrop = ls_dragdrop.
      LOOP AT g_t_mat_index.
    *Bulk Issues
            CONCATENATE c_plan_alvm c_bisu g_t_mat_index-index INTO l_field.
            ASSIGN (l_field) TO <fs_bisu>.
            CLEAR l_field.
    *Bulk Receipts
            CONCATENATE c_plan_alvm c_brcp g_t_mat_index-index INTO l_field.
            ASSIGN (l_field) TO <fs_brcp>.
            CLEAR l_field.
        ls_drag_cell-fieldname  = <fs_brcp>."l_field.
        ls_drag_cell-dragdropid = l_dragdrop_handle.
        INSERT ls_drag_cell INTO TABLE lt_drag_cells.
        CLEAR ls_drag_cell.
        ls_drag_cell-fieldname  = <fs_bisu>."l_field. 9th May
        ls_drag_cell-dragdropid = l_dragdrop_handle.
        INSERT ls_drag_cell INTO TABLE lt_drag_cells.
        CLEAR ls_drag_cell.
      ENDLOOP.
      DATA: l_index   TYPE i,
            l_erg     TYPE i.
      LOOP AT g_t_plan_alv_m.
        l_index = sy-tabix.
        l_erg = sy-tabix MOD 2.
        IF l_erg EQ 0.
          g_t_plan_alv_m-handle_dragdrop = lt_drag_cells.
          g_t_plan_alv_m-tabcolor        = lt_tabcolor.
          MODIFY g_t_plan_alv_m INDEX l_index "FROM ls_outtab
                           TRANSPORTING handle_dragdrop
                                        tabcolor.
        ENDIF.
      ENDLOOP.
      LOOP AT g_t_plan_alv_m.
        l_index = sy-tabix.
        l_erg = sy-tabix MOD 2.
        IF l_erg EQ 0.
          g_t_plan_alv_m-handle_dragdrop = lt_drag_cells.
          g_t_plan_alv_m-tabcolor        = lt_tabcolor.
          MODIFY g_t_plan_alv_m INDEX l_index "FROM ls_outtab
                           TRANSPORTING handle_dragdrop
                                        tabcolor.
        ENDIF.
      ENDLOOP.
      CALL METHOD g_plan_alv->set_table_for_first_display
        EXPORTING
          is_variant           = l_variant
          i_save               = g_save
          is_layout            = g_plan_layo
          it_toolbar_excluding = l_alv_exclude_tab[]
        CHANGING
          it_outtab            = g_t_plan_alv_m[]"gt_outtab_source[]
          it_fieldcatalog      = g_t_plan_fcat[].
    ENDFORM.                    " DRAGDROP
    FORM event_ondrag  USING    e_row         TYPE lvc_s_row
                                e_column      TYPE lvc_s_col
                                e_dragdropobj TYPE REF TO
                                                cl_dragdropobject. "#EC
      DATA:
            l_obj     TYPE REF TO lcl_dragdrop_obj.
      CREATE OBJECT l_obj.
      READ TABLE g_t_plan_alv_m INDEX e_row-index. "9thMay
      IF sy-subrc EQ 0.
        l_obj->line           = g_t_plan_alv_m."ls_outtab.
        l_obj->index          = e_row-index.
        e_dragdropobj->object = l_obj.
      ENDIF.
    ENDFORM.                    " EVENT_ONDRAG
    FORM event_ondrop  USING    e_row         TYPE lvc_s_row
                                e_column      TYPE lvc_s_col
                                e_dragdropobj TYPE REF TO
                                                 cl_dragdropobject. "#EC
      DATA: l_obj     TYPE REF TO lcl_dragdrop_obj,
            ls_outtab LIKE g_ty_s_outtab.
      CREATE OBJECT l_obj.
      IF e_row-index IS INITIAL.
        e_row-index = 1.
      ENDIF.
      CATCH SYSTEM-EXCEPTIONS move_cast_error = 1.
        l_obj ?= e_dragdropobj->object.
        ls_outtab = l_obj->line.
        MODIFY g_t_plan_alv_m INDEX e_row-index.
      ENDCATCH.
      IF sy-subrc <> 0.
        CALL METHOD e_dragdropobj->abort.
      ENDIF.
    ENDFORM.                    " EVENT_ONDROP
    *&      Form  EVENT_ONDROPCOMPLETE
    *      -->P_E_ROW  text
    *      -->P_E_COLUMN  text
    *      -->P_E_DRAGDROPOBJ  text
    FORM event_ondropcomplete  USING    e_row         type lvc_s_row
                                          e_column      type lvc_s_col
                                          e_dragdropobj type ref to
                                                  cl_dragdropobject."#EC
      data: l_obj      type ref to lcl_dragdrop_obj,
            ls_stable  type lvc_s_stbl,
            lr_grid    type ref to cl_gui_alv_grid.
      ls_stable-row = c_on."con_true.
      ls_stable-col = c_on."con_true.
      catch system-exceptions move_cast_error = 1.
        l_obj ?= e_dragdropobj->object.
      endcatch.
              lr_grid ?= e_dragdropobj->droptargetctrl.
              call method lr_grid->refresh_table_display
                exporting
                  is_stable = ls_stable.
    ENDFORM.                    " EVENT_ONDROPCOMPLETE
    *&      Form  EVENT_ONDROPGETFLAVOR
    *      -->P_E_ROW  text
    *      -->P_E_COLUMN  text
    *      -->P_ES_ROW_NO  text
    *      -->P_E_DRAGDROPOBJ  text
    *      -->P_E_FLAVORS  text
    FORM event_ondropgetflavor  USING    p_e_row
                                         p_e_column
                                         p_es_row_no
                                         p_e_dragdropobj
                                         p_e_flavors.
    ENDFORM.                    " EVENT_ONDROPGETFLAVOR

  • FillBy always fills in the same row in data grid view. How to make it fill in a new row for each click of the Fillby Button? VB 2010 EXPRESS?

    Hi there, 
    I am a beginner in Visual Basic Express 2010. I have a Point of Sale program that uses DataGridView to display records from an external microsoft access
    database using the fillby query. 
    It works, but it repopulates the same row each time, but i want to be able to display multiple records at the same time, a new row should be filled for
    each click of the fillby button. 
    also I want to be able to delete any records if the customer suddenly decides to not buy an item after it has already been entered. 
    so actually 2 questions here: 
    1. how to populate a new row for each click of the fillby button 
    2. how to delete records from data grid view after an item has been entered 
    Thanks 
    Vishwas

    Hello,
    The FillBy method loads data according to what the results are from the SELECT statement, so if there is one row then you get one row in the DataGridView, have two rows then two rows show up.
    Some examples
    Form load populates our dataset with all data as it was defined with a plain SELECT statement. Button1 loads via a query I created after the fact to filter on a column, the next button adds a new row to the existing data. When adding a new row it is appended
    to the current data displayed and the primary key is a negative value but the new key is shown after pressing the save button on the BindingNavigator or there are other ways to get the new key by manually adding the row to the backend table bypassing the Adapter.
    The following article with code shows this but does not address adapters.
    Conceptually speaking the code in the second code block shows how to get the new key
    Public Class Form1
    Private Sub StudentsBindingNavigatorSaveItem_Click(
    sender As Object, e As EventArgs) Handles StudentsBindingNavigatorSaveItem.Click
    Me.Validate()
    Me.StudentsBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'MyDataSet.Students' table. You can move, or remove it, as needed.
    Me.StudentsTableAdapter.Fill(Me.MyDataSet.Students)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Me.StudentsTableAdapter.FillBy(Me.MyDataSet.Students, ComboBox1.Text)
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Me.MyDataSet.Students.AddStudentsRow("Jane", "Adams", "Female")
    End Sub
    End Class
    Get new key taken from
    this article.
    Public Function AddNewRow(ByVal sender As Customer, ByRef Identfier As Integer) As Boolean
    Dim Success As Boolean = True
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText = InsertStatement
    cmd.Parameters.AddWithValue("@CompanyName", sender.CompanyName)
    cmd.Parameters.AddWithValue("@ContactName", sender.ContactName)
    cmd.Parameters.AddWithValue("@ContactTitle", sender.ContactTitle)
    cn.Open()
    cmd.ExecuteNonQuery()
    cmd.CommandText = "Select @@Identity"
    Identfier = CInt(cmd.ExecuteScalar)
    End Using
    End Using
    Catch ex As Exception
    Success = False
    End Try
    Return Success
    End Function
    In closing I have not given you a solution but hopefully given you some stuff/logic to assist with this issue, if not perhaps I missed what you want conceptually speaking.
    Additional resources
    http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

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

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

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

  • Check boxes in Data grid

    Hi,
    I have check boxes in data grid, using action script how do i get the values of check boxes that were selected ?
    Can anybody guide me here.
    <mx:DataGrid id="targetBaseAdd" width="100%" height="100%" dataProvider="
    {Application.application.ccModel.initializeBusinessUnitData.initializeBusinessUnit.baseArra y}">
     <mx:columns>
     <mx:DataGridColumn headerText="" width="20">
     <mx:itemRenderer>
     <mx:Component>
     <mx:HBox width="100%">
                    <mx:CheckBox horizontalCenter="0"/>  </mx:HBox>
     </mx:Component>
     </mx:itemRenderer>
     </mx:DataGridColumn>
     <mx:DataGridColumn headerText="Base" labelFunction="baseTargetList"/>
     </mx:columns>  
    </mx:DataGrid>
    Thank You,
    Anu.
    </mx:HBox>
     </mx:Component>
     </mx:itemRenderer>
     </mx:DataGridColumn>
     <mx:DataGridColumn headerText="Base" labelFunction="baseTargetList"/>
     </mx:columns>  
    </mx:DataGrid>
    Thank You,
    Anu.

    refer following examples:
    http://blog.flexmonkeypatches.com/2007/11/06/datagrid-checkbox-itemeditor/
    http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23237167.ht ml

Maybe you are looking for

  • Background job name

    Hi All, Background job related info. not getting retrieved when using function module 'SAPWL_READ_STATISTIC_FILES' (version SAP ECC 5.0 compatible) in our SAP ECC 6.0 whereas if I use 'SWNC_STAD_READ_STATRECS' I'm getting the required info. Can anyon

  • How Do I Tell If A JPEG/SWF Has Loaded/Is Loading?

    I did a site for a photographer, loading an XML file and then loading all the thumbnails and images. At his request I loaded ALL the images at the beginning (looped through XML file and loaded images one by one -- loading each when previous one loade

  • Azure project remove instead of unload now cannot find a part of the path build error

    I have an azure project built in vs2010 with a web role and worker role project. I accidently removed the worker role project then re added through 'add existing project'. Now when I try and build I get Error 1   Could not find a part of the path 'C:

  • To create a desktop shortcut icon for the application for a jar file

    Hi I have created a jar file for my application. when i double click this jar file, the application opens. What i want is-- Instead of user clicking on the jar file, my application also has to create a desktop shortcut icon. If the user clicks on the

  • SUM(DECODE(.................) in OWB???

    We have a materialized view that along with other statements has: Select SSN,...,..., SUM(DECODE(Depn_info_relationship_code,Null,0,1) Num_dependents, SUM(DECODE(Depn_info_relationship_code,'AO',1,0) Spouse, etc. I have been unable to create this in