# How do I expand dataGrid to exact size it need?

**URL:** <https://forum.kirupa.com/t/how-do-i-expand-datagrid-to-exact-size-it-need/282659>\
**Category:** flash\
**Created:** [February 24, 2009, 9:28pm UTC](https://forum.kirupa.com/t/how-do-i-expand-datagrid-to-exact-size-it-need/282659 "2009-02-24T21:28:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpthk](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@cpthk](https://forum.kirupa.com/u/cpthk)\
**Post date:** [February 24, 2009, 9:28pm UTC](https://forum.kirupa.com/t/how-do-i-expand-datagrid-to-exact-size-it-need/282659/1 "2009-02-24T21:28:39Z")

</div>

I am trying to not seeing the scroll bar. To make my dataGrid have exact height and width it need for that many of data. For example, if dataGrid read 10 rows 5 columns, then its height is exactly fit 10 rows, and width is exactly fit 5 columns. I trying height=“100%” width=“100%”, but this will expand relate to browser window size, not data size.

How do I do that?
