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 6343129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:22:34+00:00 2026-05-24T20:22:34+00:00

Given some rule I want to strike through an entire row in a DataGrid.

  • 0

Given some rule I want to strike through an entire row in a DataGrid. Is it possible?

  • 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-05-24T20:22:35+00:00Added an answer on May 24, 2026 at 8:22 pm

    The most robust way to make this work , would be to use a custom item-renderer, where overriding the OnUpdateDisplay function, you use a graphic object to draw a horizontal line right between the label of the data-grid item, based on a boolean parameter.

    I can write down something like this for a label if you want, but you will have to figure out the internals of making it work with the Datagrid item component.

    Please let me know if you want me to paste an example for label.

    EDIT (PASTING EXAMPLE)

    Create a new flex project, add a new class which extends label.The name of the class is StrikeThroughLabel .Put this in the default package as of now (i.e leave the package field empty)

        package
    {
        import mx.controls.Label;
    
        public class StrikeThroughLabel extends Label
        {
            private var isStriked:Boolean = false;
    
            public function StrikeThroughLabel()
            {
                super();
            }
    
            public function set striked(aIsStriked:Boolean):void{
                isStriked =  aIsStriked;
                this.updateDisplayList(this.width, this.height);
            }
    
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                if(isStriked){
                    graphics.lineStyle(1,0x0000FF,1,false,"normal",null,null,3.0);
                    graphics.lineTo(unscaledWidth,unscaledHeight);
                }else{
                    graphics.clear();
                }
            }
        }
    }
    

    Once thats done, come to your main.mxml and use the code that follows for mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="windowedapplication1_creationCompleteHandler(event)"
                            xmlns:local="*">
        <local:StrikeThroughLabel id="strikeThrough" text="Hello" x="129" y="128"/>
        <mx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
    
    
                private var isLabelStriked:Boolean = false;
    
                protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
                {
                    // TODO Auto-generated method stub
                    //this.strikeThrough.striked = true;    
                }
    
    
                protected function button1_clickHandler(event:MouseEvent):void
                {
                    // TODO Auto-generated method stub
                    isLabelStriked = !isLabelStriked;
                    this.strikeThrough.striked = isLabelStriked;
                }
    
            ]]>
        </mx:Script>
        <mx:Button click="button1_clickHandler(event)" id="myButton" label="Toggle"/>
    </mx:WindowedApplication>
    

    The above shows you a button and a label, clicking on the button toggles the strikethrough on the label.
    Please note, right now the strike-through is diagonal, but just a few tweaks with the login of drawing the line, and you should get a horizontal strike-throught.

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

Sidebar

Related Questions

given a simple delimiter separated text database, I want to construct a regexp rule,
I'm doing some experiments with Prolog and having difficulties with the following rule: row(Row,
Given some source file (or more generic - input stream), I need to find
Given some (English) word that we shall assume is a plural , is it
Given some typical search form, I can't construct this form action when submitting a
Given some arbitrary SQL I would like to get the data types of the
I have been given some poorly formatted data and need to pull numbers out
If I am given some data in the following format: data = [ ['Airbus',
I have been given some matlab code compiled using the .net compiler. I can
I have been given some generated code which looks like so: <form id=form1 method=post

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.