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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Is it possible to control specific row in grid allowed to edit or not using X++

(0) ShareShare
ReportReport
Posted on by 334

Hi, exports:

I would like to know is it possible to control a row(whole column) in a grid to editable or not depends on the column's data of the row (for example. status)?

I do some research but didn't find the solution.

I'm using AX 2012 CU7 .

If would be appreciated if anyone provide the suggestion.  thanks in advance

Quatrani

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    community.dynamics.com/.../94513

  • Verified answer
    Martin Dráb Profile Picture
    239,992 Most Valuable Professional on at

    Yes, it's possible and it's commonly used in AX 2012.

    Override active() method of the datasource and put your logic there (using allowEdit() of the datasource). Don't forget to enable editing again for other rows.

    You can find a plenty of examples in the standard application, if needed.

  • Verified answer
    Udit Profile Picture
    567 on at

    Hi quatrani,

    Depending on your scenario, you can use following code -

    in active method

    if(condition)

    {

    datasource_ds.enable(true);

    }

    else

    {

    datasource_ds.enable(false);

    }

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans