Code Example on “Setting dynamically rowCount property on DataGrid.”

Code Example on “Setting dynamically rowCount property on DataGrid.”

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml&#8221; layout=”absolute” creationComplete=”init()”>
<mx:Script>
<![CDATA[
private function init():void
{
dg.dataProvider=arr;
dg.rowCount=arr.length;
}
]]>
</mx:Script>
<mx:DataGrid x=”260″ y=”125″ id=”dg” rowCount=”2″>
<mx:columns>
<mx:DataGridColumn headerText=”Names” dataField=”label” />
</mx:columns>
</mx:DataGrid>
<mx:Array id=”arr”>
<mx:Object label=”Kumar1″/>
<mx:Object label=”Kumar2″/>
<mx:Object label=”Kumar3″/>
<mx:Object label=”Kumar4″/>
<mx:Object label=”Kumar5″/>
<mx:Object label=”Kumar6″/>
</mx:Array>
</mx:Application>

Here when you run the example you can see the rows of the DataGrid changing.as that of the property.

The actual post is here and this is the code example of that post.As the viewer requested.

Enjoy the post.Comments are welcome.

Advertisements

2 Responses to Code Example on “Setting dynamically rowCount property on DataGrid.”

  1. […] View Example for “Code Example on “Setting dynamically rowCount property on DataGrid.”” The actual post is here […]

  2. sandrar says:

    Hi! I was surfing and found your blog post… nice! I love your blog. 🙂 Cheers! Sandra. R.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: