0 Replies Latest reply on Sep 18, 2007 10:53 AM by Wayne_1977

    Why aren't my datagrid columns in the order I specified?

    Wayne_1977 Level 1
      Hi folks,

      I've got a datagrid:

      <mx:DataGrid xmlns:mx=" http://www.adobe.com/2006/mxml"
      dataProvider="{arrPermisList}"
      itemClick="gridClick(event)"
      sortableColumns="false">

      and a bunch of columns defined, like this:

      <mx:DataGridColumn headerText="Content Type" dataField="xxx" textAlign="center" sortable="false"/>
      <mx:DataGridColumn headerText="Create" dataField="MayCreate" textAlign="center" sortable="false"/>
      ...

      The dataprovider (an array) looks like this:

      private var arrPermisList:Array =
      [
      { ContentTypeCode: "AUD", ConTypeName: "Audio Clips", MayCreate: true, MayRead: true, MayUpdate: true, MayDelete: true, MayModerate: true, MayAdministrate: true, MayPublish: true }
      , { ContentTypeCode: "LIST",ConTypeName: "Lists", MayCreate: true, MayRead: true, MayUpdate: true, MayDelete: true, MayModerate: true, MayAdministrate: true, MayPublish: true }
      ...

      My problem is that the grid display the columns in ALPHABETICAL order, rather than the order in which I listed the columns. I see from the docs this is correct behavior. But of course, I want my columns in the order I specified, not alphabetical. Would anyone know how to turn this feature off?

      Thanks,

      ws