Given some rule I want to strike through an entire row in a DataGrid. Is it possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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)
Once thats done, come to your main.mxml and use the code that follows for mxml:
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.