web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Unable to bind datasource to Listview in Form

(0) ShareShare
ReportReport
Posted on by 85

Hi,

I have created a new Table (Tester)and Form (Tester). I have placed a Listview in form and wanted to populate that from the Form Datasource (tTest). Is there a good example anywhere on how to do this? Note: Form does not get called from another form. I only want to see this in test.

Here is code on Form Method - the while(testerTable) is not entered even though there is a record in the table. 

public void init()
{
    MultiSelectionHelper multiSelectionHelper;
    Tester testerTable;
    super();

    multiSelectionHelper = multiSelectionHelper::construct();
    multiSelectionHelper.parmDatasource(Tester.dataSource());

    testerTable = multiSelectionHelper.getFirst();

    while(testerTable)
    {
        ListView.add(strFmt("%1    -     %2",testerTable.ItemId, testerTable.Name));

        testerTable = multiSelectionHelper.getNext();

    }


}

*This post is locked for comments

I have the same question (0)
  • xiaoyuandlg Profile Picture
    80 on at

    Your codes doesn't looks strange, hard too give a comment where problem occurs. Anyway, try read some listview data-binding? Or use some UI form control?

  • Suggested answer
    Community Member Profile Picture
    on at

    I suggest if you can review a standard AX Form called

    tutorial_Form_ListControl

    this will help you understand how to use the ListView control on the form.

  • Suggested answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    Look in the AOT (the best manual there is :-)

    tutorial_Form_ListControl

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans