Avoiding Sorting of DataGrid column on click of Header.

This is set to “true”  by default and when you click the header the column values are sorted in descending order first and on secound click it is reversed.

And the property that is set is sortableColumns and it is set to “true” by default.So to disable it set it to “false”.like: sortableColumns=”false” .

code Example:

<mx:DataGrid x=”98″ y=”212″ id=”dgcolor” sortableColumns=”false”>
<mx:columns>
<mx:DataGridColumn headerText=”Column 1″ />
<mx:DataGridColumn headerText=”Column 2″ />
</mx:columns>
</mx:DataGrid>

This shows the difference..

Advertisements

One Response to Avoiding Sorting of DataGrid column on click of Header.

  1. Vineet Markan says:

    Thanks, saved me some time.

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: