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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to show Grid as a Empty When form will open but after filter Data ,Grid should display Data

(1) ShareShare
ReportReport
Posted on by

Hi,

I am new in this field. so i am getting confused. Requirement is that , there are two textboxes on form ,1 grid & 1 View button.

Now i want that When i will open my form ,grid should be empty. but if i set some daterange in that two textboxes, after clicking on View button,Respective data should be display. please help me.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rohin Profile Picture
    4,624 on at

    Hi,

    You have to set range by default (for example "Blank" like when form open) and then call it in exceuteQuery()  datasource method.

     However, you have to set range in executeQuery() method and call it on your View button clicked method for filtering data. There are lot of stuff over internet for filtering data on form.

  • Community Member Profile Picture
    on at

    Sir, i have already filter the data. My concern is that whenever  i will open my form ,Grid should be empty.

  • Suggested answer
    Satish kakileti Profile Picture
    185 on at

    Hi Rashmi,

    Try this,

    form declaration:

    declare fromdateGlobal, todateGlobal with dateNull;

    Datasource execute query method: this.query().datassource(XXX).addrange(datefield).value(daterange with global variables declared in form declaration);

    In View button clicked method:

    Assign entered dates to global variables;

    call datasource execute query method.

    Hope this helps.

    Thanks and regards,

    Satish Kakileti.

  • Suggested answer
    Community Member Profile Picture
    on at

    RashmiAx,

    You can achieve empty grid by adding any dummy range in ExecuteQuery() against what no data appears. Now on button clicked event add actual range and get your desired data in grid.

  • Suggested answer
    Community Member Profile Picture
    on at

    You can use  a temporary table, and after that you want to do with the data, you can insert this values into a regular table.

    Like this: community.dynamics.com/.../ax-2012-using-temporary-table-as-form-s-datasource

    you need to create the method in the table or in the form to pull the data you need, then insert the data into the temporary table, and call this method in the button you want to use in the form, every time they open the form the grid will be empty until the user click the button.

  • Suggested answer
    Rohin Profile Picture
    4,624 on at

    Hello RashmiAxm

     That what i suggested you before, you can acheive it by passing null date range by default in executeQuery() method of datasource .

      And this exceuteQuery() method is called when form opens so it will set range on your form automatically which cause your grid empty on form.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans