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)

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
    237,878 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

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans