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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:39:24+00:00 2026-05-17T02:39:24+00:00

I have defined the datagrid as follows <mx:DataGrid id=dg width=100% height=100% > In the

  • 0

I have defined the datagrid as follows

<mx:DataGrid id="dg" width="100%" height="100%" >

In the part i am trying to get the details from the database and setting the dataProvider for the DataGrid as follows.

var arrayContent:ArrayCollection = new ArrayCollection();

                for(var i:int=0;i<assetClassDetails.length;i++)
                {
                    var assetClass_:AssetItemClassVO = new AssetItemClassVO();
                    var array:ArrayCollection = new ArrayCollection();
                    var embeddableLocale:EmbeddableAssetItemClassLocale = new EmbeddableAssetItemClassLocale();
                    var assetClassD_:AssetItemClassLocale = new AssetItemClassLocale(); 
                    assetClass_ = assetClassDetails.getItemAt(i) as AssetItemClassVO;
                    array = assetClass_.assetItemClassLocale;
                    if(assetClass_ != null && array != null && array.length >0)
                    {
                    assetClassD_ = array.getItemAt(0) as AssetItemClassLocale;

                    arrayContent.addItem(new Array(assetClass_.id,assetClassD_.name,assetClassD_.description,assetClassD_.locale,assetClass_.createdby,assetClass_.createdtime,assetClass_.lastmodifiedby,assetClass_.lastmodifiedtime));

                    }            
                }   


                    dg.dataProvider = arrayContent; 

But after doing this, I am getting the column name as 1,2,3,4,5 …8.
But I want to set theColumn name as ID,Name,Description,Locale,CreatedBy,CreatedTime,LastModifiedBy,LastModifiedTime.

How do i do it?

Please help.

  • 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. Editorial Team
    Editorial Team
    2026-05-17T02:39:24+00:00Added an answer on May 17, 2026 at 2:39 am

    Not 100% sure what you’re trying to do, but here’s an example of DataGrid data binding. Hope it helps.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application initialize="init()"
        xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
    
                [Bindable]
                private var employees:ArrayCollection;
    
                private function init():void
                {
                    employees = new ArrayCollection();
                    employees.addItem({name: "Oscar", phone: "907.123.4567", email: "oscar@isacat.net"});
                    employees.addItem({name: "Nimrod", phone: "907.876.5342", email: "nimrod@isacat.net"});
                }
            ]]>
        </mx:Script>
    
        <mx:DataGrid id="dg" color="0x323232" width="100%" rowCount="3" dataProvider="{employees}">
            <mx:columns>
                <mx:DataGridColumn dataField="name" headerText="Name"/>
                <mx:DataGridColumn dataField="phone" headerText="Phone"/>
                <mx:DataGridColumn dataField="email" headerText="Email"/>
            </mx:columns>
        </mx:DataGrid>  
    </mx:Application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataGrid defined as follows as part of a UserControl: <DataGrid x:Name=dtGrid
I have a datagrid defined in XAML as follows: <toolkit:DataGrid Margin=10,116,62,34 Name=WADataGrid RowBackground=LightYellow AlternatingRowBackground=White
I have a DataGrid which is as follows:: <wpfkit:DataGrid AutoGenerateColumns=False ItemsSource={Binding} Width=Auto FrozenColumnCount=2 SelectionMode=Extended
I have defined a datagrid like this :: <cc:PEDataGrid AutoGenerateColumns=False ItemsSource={Binding Rows} Width=Auto PreviewMouseRightButtonDown=PEGrid_PreviewMouseRightButtonDown
I have defined a personalizable property on a web part and I would like
I have defined the global nls_date_format on Oracle 10.2 XE as follows: alter system
I have defined a class A and derived a new class B from A
The situation is simple. I have a datagrid that gets its data from a
I have the next code where I defined a WPF toolkit datagrid control called
I have a datagrid which displays details for a product. For a particular product

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.