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)

How to show Grid as Empty when a form is opened?

(0) ShareShare
ReportReport
Posted on by 197

Hi Everyone,

 I am new to Microsoft Dynamcis AX  How to show a GRID AS EMPTY when a form is opened

I have searched alot in google but i cant find a solution for it

Please can anyone help me

Thank You,

Swetha

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    If the grid is connected to a From DataSource, then you just have to change the property on that datasource to AutoSearch=No. This way the data will not be fetched by default and the grid will be empty, the record only will come if you specifically call executeQuery or research on the _ds

  • Swetha Molagavalli Profile Picture
    197 on at

    Thank You Vilmos kintera its working

  • Ashrafhk Profile Picture
    90 on at

    Great! It is working.

    Thanks a lot

  • akshi Profile Picture
    152 on at

    Hello Vilmos,

    when I set the datasource to AutoSearch=No, the data does not appear in the grid when I press the button after the populate process.

    I am inserting the records into the datasource in the form's method.

    Is there a way to change DS properties from Form's click method?

    Thanks.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    akshi, we can't find the bug in the code you execute to after clicking the button, because you told us nothing about it. Either show your code to us, or at least describe what code you have there.

  • akshi Profile Picture
    152 on at

    Hi Martin, here is my clicked method.

    The form datasource uses TempDB tables.

    I created the populateRecords() in the form datasource to insert the TempDB table.

    public void clicked()
    
           {
    
               TestEnumInfoTemp tempTable;
    
               super();
    
               // Enum label display on Form
    
               TestEnumName testEnumName = EnumName.text();
    
               DictEnum dictEnum = new DictEnum(enumName2Id(testEnumName));
    
               FormStringControl eNumLabel = element.design().controlName("EnumLabel");
    
               eNumLabel.text(dictEnum.label());
    
               // insert data to TempDB table
    
               tempTable = element.populateRecords(testEnumName);
    
               delete_from TestEnumInfoTemp;
    
               TestEnumInfoTemp.linkPhysicalTableInstance(tempTable);      
    
           }

    The initial display is the situation where 0 is displayed in the Grid.(below)

    1104.Bug.jpg

    Thanks.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    That's a different topic about a different product. Please create a new thread in Dynamics 365 Finance Forum and explain your particular situation there. We're off-topic here.

  • akshi Profile Picture
    152 on at

    got it. I'll post a question with a new thread.

    But, currently, I can't post a question due to the following error, so I'm contacting the community manager.

    Sorry we could not find the requested page.

    Here are some resources that might be helpful:

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