button add a new row of data in grid

Hello all,

i’m new at dynamics ax2012 and i’m learning a lot. Acqually i’m workin on populating grids. I’ve create a table and a form with a grid and i display them data in this grid.

now i’d want to populate a simple button and when i click on button it will create new line on grid to add new data

Best regards

Go to AOT, right-click Forms and choose New Form from template > Simple list (for example). The form already has the button you need (called NewButton), you just have to set its DataSource property.

It’s a command button with Command = New - you could create it manually, nevertheless starting from a template is the recommended approach. It will help you to comply with Form User Experience Guidelines.

Than you ,it’s worked

  1. create a button in the 2) and overwrite the click method under design say your table name is “mytable” which you dragged in form’s data source void clicked() { mytable_ds.create(true); super(); } 4)

both solutions are fine , now , i m looking for to put this form in a main menu to display it in mms dynamics ax client