最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

AX 2012: Getting ReferenceGroup Control

网络文摘 William 3052浏览 0评论

Getting ReferenceGroup control automatically while dragging a datasource field to a form control is little tricky. Even if you have defined relations correctly at the table level, you might not always get the reference group control for a foreign key in the table. See the solution below for this issue.

Problem:

Consider for example, two tables:

1. FAZCourseTable
2. FAZEnrollmentTable

where FAZEnrollmentTable contains the foreign key of FAZCourseTable as follows:

Untitled

But when I drag this foreign key field from datasource to grid control, I get Int64Edit control instead of ReferenceGroup control.

Untitled

Resolution:

To get the ReferenceGroup control, perform the following development steps:

1. Create unique index on FAZCourseTable for the natural key of the table which in this case is Code field.
2. Set AllowDuplicates to No on the index properties.
3. Set AlternateKey to Yes on the index properties.

Untitled

4. Set ReplacementKey to CodeIdx, name of the index just created, on the table properties.

Untitled

5. Delete the Int64Edit control created earlier on the form.
6. Drag the FAZCourseTable field from the datasource to the grid control node.
7. You should be getting the ReferenceGroup control now.

Untitled


发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址