Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:21:29+00:00 2026-06-03T04:21:29+00:00

i am using spark datagrid for my application. i am using one cusomrenderer (contains

  • 0

i am using spark datagrid for my application. i am using one cusomrenderer (contains one link) for my spark datagrid.Text in the columns are truncated with respect to it’s column size.but the link is not truncated, it is overlapped to next column ,that is not fair.i want that link column should be truncated within its column.here i have given my sample code.

<?xml version="1.0" encoding="utf-8"?>

<s:Application name="Spark_DataGrid_columns_test"
               xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()">
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;

            import spark.components.Grid;
            import spark.components.gridClasses.CellPosition;
            private function init():void
            {


                var link:ClassFactory = new ClassFactory(sparkLinkRenderer);
                linkColumn.itemRenderer = link;
            }



        ]]>
    </fx:Script>
    <fx:Declarations>
        <s:ArrayList id="TweetersList">
            <fx:Object drink="onetqwo three four five six seven eight" name="Dan Florio"    twitter="polyGeek polyGeek polyGeek polyGeek polyGeek" />
            <fx:Object drink="one" name="David Ortinau"     twitter="davidortinau"  />
            <fx:Object drink="one" name="Simeon Bateman"    twitter="simBateman"/>
            <fx:Object drink="one" name="Dan Florio"    twitter="polyGeek" />
            <fx:Object drink="one" name="David Ortinau"     twitter="davidortinau" />
            <fx:Object drink="one" name="Simeon Bateman"    twitter="simBateman" />
            <fx:Object drink="one" name="Dan Florio"    twitter="polyGeek" />
            <fx:Object drink="one" name="David Ortinau"     twitter="davidortinau" />
            <fx:Object drink="one" name="Simeon Bateman"    twitter="simBateman" />
            <fx:Object drink="one" name="Dan Florio"    twitter="polyGeek" />
            <fx:Object drink="one" name="David Ortinau"     twitter="davidortinau"/>
            <fx:Object drink="one" name="Simeon Bateman"    twitter="simBateman"/>
        </s:ArrayList>
    </fx:Declarations>

    <s:DataGrid id="spdg" width="500" height="250" >
        <s:columns>
            <s:ArrayList>
                <s:GridColumn width="100" id="linkColumn"  dataField="drink"/>
                <s:GridColumn width="100" dataField="name"/>
                <s:GridColumn width="100" dataField="twitter"/>
            </s:ArrayList>
        </s:columns>
    </s:DataGrid>
</s:Application>

the link custom renderer code:

<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx"  
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    width="100%"  >
    <fx:Script>
        <![CDATA[


                override public function set data(value:Object):void
                {   
                    super.data = value;
                    linkButton.label = value.drink;
                }

            ]]>
    </fx:Script>
    <mx:LinkButton id="linkButton" color="#170909" textAlign="left" fontWeight="normal" textDecoration="underline">
    </mx:LinkButton>
</s:GridItemRenderer>

sample snapshot of my output:

enter image description here

please suggest me on this issue.

thanks in advance,
vengatesh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:21:30+00:00Added an answer on June 3, 2026 at 4:21 am

    Well first i posted bounty and then i found a solution…

    GridItemRenderer has a property clipAndEnableScrolling which does just that if set to true.

    <?xml version="1.0" encoding="utf-8"?>
    <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx"  
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    width="100%" 
                    clipAndEnableScrolling="true">
    <fx:Script>
        <![CDATA[
    
    
                override public function set data(value:Object):void
                {   
                    super.data = value;
                    linkButton.label = value.drink;
                }
    
            ]]>
    </fx:Script>
    <mx:LinkButton id="linkButton" color="#170909" textAlign="left" fontWeight="normal" textDecoration="underline">
    </mx:LinkButton>
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following itemrenderer in one of the column of my datagrid.
I'm using a spark Datagrid in an mobile Flex (4.6) application. When a row
I'm using the spark view engine with my asp.net mvc application. In my aspx
I'm using Flashbuilder 4.6 and can't get sorting of columns in my s:DataGrid to
I am playing back local video in an AIR application using the Spark Video
How do I populate the Spark List control using onlt plain text files? E.g.,
We've been using Spark view engine for a while now in our application. Since
I am using Flex 4 with Spark components to build a mobile application and
I am populating 3 columns of my datagrid using a simple XML file. The
I have the following code in a partial view (using Spark): <span id=selectCount>0</span> video(s)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.