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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:19:59+00:00 2026-05-11T02:19:59+00:00

I have rows of text data that can vary between 0 and 100, and

  • 0

I have rows of text data that can vary between 0 and 100, and all need to be visible on the screen at one time. The default behavior is fine for the grid until the rows * rowHeight > gridHeight.

Basically I need a hook into the item height, or row height to calculate it based on the height of the grid. I’ve set paddingTop and paddingBottom to zero, but there is still a considerable amount of white space in between rows.

My datagrid component…

<mx:DataGrid xmlns:mx='http://www.adobe.com/2006/mxml' creationComplete='OnCreationComplete()' paddingTop='0' paddingBottom='0' >  <mx:Script>     <![CDATA[      private function OnCreationComplete():void     {         //setRowHeight(10);     }      override protected function setRowHeight(v:Number):void     {         super.setRowHeight(v);     }      ]]> </mx:Script>  </mx:DataGrid> 

setRowHeight() helps, but the itemRender for the cell bigger than the cell, if I set the row height to something like 10.

  • 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. 2026-05-11T02:20:00+00:00Added an answer on May 11, 2026 at 2:20 am

    Thank you inferis, that helped me a lot. This is my final grid component. It’s not really self contained because of a few call-outs, but if it helps someone else get theirs to work, great!

    <?xml version='1.0' encoding='utf-8'?> <mx:DataGrid xmlns:mx='http://www.adobe.com/2006/mxml' paddingTop='-3' paddingBottom='-3' resize='OnResize(event)' >  <mx:Script>     <![CDATA[         import mx.containers.Panel;     import mx.core.Application;     import mx.events.ResizeEvent;      protected function OnResize(event:ResizeEvent):void     {         this.invalidateDisplayList();     }  /**  *  @private  *  Sizes and positions the column headers, columns, and items based on the  *  size of the DataGrid.  */ override protected function updateDisplayList(unscaledWidth:Number,                                               unscaledHeight:Number):void {     if( this.collection.length > 0 ) // so don't divide by zero     {         var appHeight:Number = Application.application.height;         var appMinusMenuHeight:Number = appHeight - Application.application.hboxPrintBar.height;         var boxHeight:Number = Application.application.vboxViewAll.height;         if( boxHeight > 0 )         {             var gridHeight:Number = (appMinusMenuHeight - this.headerHeight) * 0.93;             var calcHeight:Number = gridHeight / this.collection.length;             var calcHeightFloor:Number = Math.floor( calcHeight );             setRowHeight( calcHeightFloor );             //var p:Panel = this.parent as Panel;             //p.title = calcHeightFloor.toString();             if( calcHeightFloor <= 10 )                 this.setStyle('fontSize',calcHeightFloor);         }     }     super.updateDisplayList(unscaledWidth,unscaledHeight); }      ]]> </mx:Script>  </mx:DataGrid> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer One built into your GUI can be very helpful (I… May 11, 2026 at 3:40 pm
  • added an answer Well, you can just count how many times you shift… May 11, 2026 at 3:40 pm
  • added an answer 31 gigs is a really big text file. I bet… May 11, 2026 at 3:40 pm

Related Questions

I am wondering if there is a way to make ASP.NET controls play nicely
I have table rows of data in html being filled from a CGI application.
I'm trying to investigate when & why certain rows are getting deleted in a
For our application, we keep large amounts of data indexed by three integer columns

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.