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 handle Unbound Checkbox in Grid in AX 2009

(0) ShareShare
ReportReport
Posted on by 480

Hi,

I have added the grid on the form and on that grid I have added the check box control.

My scenario is when the user click on the check box of any of the record than the check box for this records should be checked but all of the other records should not be checked if they are already checked on that checkbox control.

and on the click of that checkbox I want to enable disable one of the button on form.

How can i acheive this can anyone guide me.

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    5400 Profile Picture
    7,162 on at

    Is it your check box bound control or un-bound control. If it is bound control please override the modify method in control and write your logic for marking.

    Second, if you want enabled or disabled the button, please write one method in form and put the logic like

    if (checkbox == Noyes::Yes)

    {

     control.enabled(true); // Make sure your button autodeclaration property is set as "yes"

    }

    else

    {

       control.enabled(false);

    }

    If it is unbound - please add dataGroup under Grid and create cache to store the value and proceed with same logic.

  • Community Member Profile Picture
    on at

    If you want to add a check box to a grid that works properly you have to either create a field in the actual table or use an edit method in combination with a collection class (set/map).

    Refer to this blog for the second possiblity:

    http://basicax.blogspot.de/2012/06/how-to-use-edit-methods-to-mark-records.html

    If you want to process the marked records you have to iterate throught the map/set and do your operation.

    Enabling or disabling buttons does not make much sense to me. If you have 10 records in the grid and 5 are marked and 5 are not, whats the state of the button going to be? If it`s supposed to be based on the currently selected record, you have to add your logic to the active() method of the data source where you can query if the current record is in the map/set or not.

  • Muhammad Zahid Profile Picture
    480 on at

    my checkbox control is unbound.and my scenario is I want the user to check only one record at a time.For example user clicks checkbox of the first records in the grid and than user clicks the checkbox of thirds records in the grid than the checbox of the first records in the grid should be un checked automatically.

  • Muhammad Zahid Profile Picture
    480 on at

    and once the checkbox is checked I have to write some logic to disable enable some other button on form based on records in a row.

  • Community Member Profile Picture
    on at

    Use the edit method I suggested. If it's always a single record you can just use a simple RecId variable instead of a map.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans