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 can the values in FormGridControl be updated

(0) ShareShare
ReportReport
Posted on by 771

I am working on a project where i am required to update the values for a given row on a formGrid using a script. Here is what i am trying

    FormDateControl = form5604D4.design().control(12294);

    FormDateControl.dateValue( 10\02\2012 );

The dateControl is inside a grid i tried to debug and realized that the FormDateControl does get initialized however the dateValue is not reflected in the GridControl
I get no error message whatsoever. Appreciate your help 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Joris dG Profile Picture
    17,780 on at

    You should update the record buffer or the underlying bound values of the control, but never the control itself (definitely not on a grid).

    If you would update the value of the control and it's bound to a row in the database, it won't update it anyway.

    if your control is bound to a record you can just call the datasource by name and set the field, for example

    mydatasource.fieldname = 10\02\2012;

    Also, in the rare cases where you want to update a control on a form, don't use the control ID to get the control. Those are run-time numbers and not guaranteed to be the same. You can set the control's "autodeclaration" property to true, which allows you to access the control from code by name.

  • Santosh Singh Profile Picture
    771 on at

    Dear Joris,

    Thanks for the reply and the valueable inputs. I did realize that i need to update the underlying datasource and not the control itself.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans