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 Enable\Disable Perticular Column in Grid ??

(0) ShareShare
ReportReport
Posted on by 1,010

I want to set Enable/Disable one field of particular row

Like

                     Home        Phone         Travel

              1.    Value11    Value12     Value 13

              2.    Value21    Value22     Value 23

              3.    Value31    Value32     Value 33

              4.    Value41    Value42     Value 43

For example i want to disable Value33 of Row3. for this I write following code in Active method of DataSource.

if(LISPL_ProjectContractTable.Travel== NoYes::No )
{
LISPL_ProjectContractTable_ds.object(fieldNum(LISPL_ProjectContractTable,Travel)).enabled(false);

}

but whenever  i am writing value on one Column it is copying the same value to all column of row.

Kindly Do Help..

*This post is locked for comments

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    308,187 Super User 2026 Season 2 on at

    Hi D.K.S,

    The coding is disabling the complete column. You should also have an option to re-enable the field for other records.

    So also add:

    else

    {

    LISPL_ProjectContractTable_ds.object(fieldNum(LISPL_ProjectContractTable,Travel)).enabled(true);

    }

    Or replace the complete logic with:

    LISPL_ProjectContractTable_ds.object(fieldNum(LISPL_ProjectContractTable,Travel)).enabled(LISPL_ProjectContractTable.Travel== NoYes::Yes);

  • Suggested answer
    Martin Dráb Profile Picture
    241,635 Most Valuable Professional on at

    Of course - it's a property of the column, not of an individual cell. But that's all right, because if users switches to another row, activate() executes again and set the value appropriately based on data in the active row. What's the value of Enabled property for inactive rows is irrelevant, because users can't work with them.

  • D.K.S. Profile Picture
    1,010 on at

    Hello Martin,

    So How can i do it for Perticular Cell ? Kindly help.

  • D.K.S. Profile Picture
    1,010 on at

    Hi Andre, I did the same you told. I kept break point and debugged but active method is not calling on Row Change in Grid.

    how do i can achieve my goal to Enable/Disable Grid of Perticular Cell. ??

  • Verified answer
    Martin Dráb Profile Picture
    241,635 Most Valuable Professional on at

    You can't do it for individual cells. Please read my reply again.

    If your active() method isn't called, you're probably working with a wrong datasource.

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

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

#1
nmaenpaa Profile Picture

nmaenpaa 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans