Monday, March 22, 2010
Binding Table Contents to a Drop Down List in a Grid with MorphX: Displaying Name & Description
In my last post, I demonstrated how to “bind” a Grid field to a table in drop down list. The example demonstrated how to list the Name column, as defined by the Relation in the Extended Data Type; however, in most cases, the list will need to not only display the Name column, but the Description as well. I actually struggled with how this was accomplished, that was, until an expert AX developer pointed me in the right direction. It turns out, given all the places within the AOT where you can see and set various properties to accomplish a desired task (or totally dork something up), the solution is extremely simple. When viewing the Properties on the table being “bound” to, there are two key properties called TitleField1 and TitleField2. Setting TitleField1 = Name and TitleField2 = Description solves this problem, and both the Name and Description data displays in the drop down list.