DisplayKey 元素 (CSDL)
DisplayKey 元素會包含共同構成強式識別碼之下列元素的清單。 DisplayKey 只會顯示成 Entity 元素的子系。
DisplayKey 元素會套用至下列物件:
資料行
角色端
適用的屬性
下表列出了在 DisplayKey 元素上找到的屬性。
屬性名稱 |
是否必要 |
值 |
---|---|---|
IsDisplayKey |
否 |
True 或 false。 |
備註
此元素適用於報表。 您套用此屬性的元素不需要是實際的資料表索引鍵,只要是您將呈現為索引鍵的元素即可。 不過,資料行必須包含唯一值。
範例
下列範例顯示已經指定為 ProductCategory 資料表之顯示索引鍵的 EnglishProductCategoryName 資料行。
<EntityType Name="ProductCategory">
<Key>
<PropertyRef Name="RowNumber" />
</Key>
...
<bi:EntityType>
<bi:DisplayKey>
<bi:MemberRef Name="EnglishProductCategoryName" />
</bi:DisplayKey>
</bi:EntityType>
</EntityType>