Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

How to assign selected item from combobox into grid in ax?

Posted on by Microsoft Employee

I have created one combobox with A,B,C values when i select particular values that selected value should be assign to grid .my problem is how to assign selected value into grid.

  • UmesH@ Profile Picture
    UmesH@ 810 on at
    RE: How to assign selected item from combobox into grid in ax?

    Create Display Method in table and Call in StringEdit Control in Grid.

    Display str StudentName()
    {
        A_Student _Student;
        ;
        select Student_Name from _Student where _Student.Student_ID== this.Mark_Student;
        return _Student.Student_Name;
    }
    
    //fill stringedit by changing dropdown
    //set this method in sub table method


  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: How to assign selected item from combobox into grid in ax?

    Don't use select statement for binding values to the grid. It is not the best practice.

    Add the table as form datasource and drag that datasource fields in to grid, create range and assign value to range by using x++ code.

    Please refer to this link

    dynamics-ax-live.blogspot.in/.../how-to-filter-records-in-form-by-code.html

    Instead of using combo box and adding filter by using x++, the user can use default grid filter option by press ctrl+g shortcut. I am not sure that it is ok for you.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to assign selected item from combobox into grid in ax?

    while select * from Temptable

    where temptable.num==1000

    {

    --------------------//How to write code to assign values into grid

    //select all temptable values where num ==1000  and assign into grid.

    }

  • Hariharans87 Profile Picture
    Hariharans87 4,971 on at
    RE: How to assign selected item from combobox into grid in ax?

    I could not understand that what you mean of assign selected value into grid?

    Are you talking about filtering the grid?

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans