Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Display Atrribute for Column in Table #1278

Closed
Garfieldgzhh opened this issue Mar 26, 2021 · 2 comments · Fixed by #1310
Closed

Feature Request: Display Atrribute for Column in Table #1278

Garfieldgzhh opened this issue Mar 26, 2021 · 2 comments · Fixed by #1310
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Garfieldgzhh
Copy link

Is your feature request related to a problem? Please describe.

I am trying to create a Table and use the "Display" attribute for the name of the columns, but after setting [Display(Name="ColumnName")], the column uses the name of variable as its display name

Describe the solution you'd like

When I write:
[Display(Name="SomeName")]
public Column column1;

The first row of this column should show "SomeName" instead of column1

Additional context

I use Ant-Design-Blazor for internal data systems. It would be convenient if I can set the name columns to a string that might contain Chinese characters for localization.

@anranruye
Copy link
Member

anranruye commented Mar 26, 2021

+1
It seems that [DisplayName] attribute is being used for this case(I found this from source code yesterday). But [Display] attribute should also be supported.

@ElderJames ElderJames added enhancement New feature or request help wanted Extra attention is needed labels Mar 26, 2021
@github-actions
Copy link

Hello @Garfieldgzhh. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please fill the Pull Request Template here, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @Garfieldgzhh,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@ElderJames ElderJames linked a pull request Apr 4, 2021 that will close this issue
15 tasks
ElderJames pushed a commit that referenced this issue Apr 4, 2021
feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes #1278
YMohd pushed a commit to YMohd/ant-design-blazor that referenced this issue Apr 6, 2021
…azor#1310)

feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes ant-design-blazor#1278
ElderJames added a commit that referenced this issue Apr 15, 2021
* feat(module: table): add a method to get query model (#1202)

* feat(module: table): add OnExpand event (#1208)

* feat(module: table): add summary (#1218)

* feat(module: table): add summary row

* feat: add fixed summary cell

* feat(module: InputNumber): Add long-click and keyboard operation (#1235)

* feat(module: InputNumber): Add long click and keyboard event

1. When hold mouse down button will always trigger the increase or decrease
2. Add event listener to "ArrowUp" and "ArrowDown" key

* feat(module: InputNumber): Add long click and keyboard event

1. When hold mouse down button will always trigger the increase or decrease
2. Add event listener to "ArrowUp" and "ArrowDown" key

* fix null reference exception

Co-authored-by: ElderJames <shunjiey@hotmail.com>

* refactor(module: pagination): cover the apis of react (#1220)

* feat(module: config-provider): support RTL (#1238)

* feat(module: config-provider): support RTL

* add rtl for each component

* fix rtl for pagination

* add rtl for overlay

* chore: sync ant-design v4.14.0 (#1249)

* feat(module: tag): add closing event (#1268)

* tag add onclosing
event

* clean code

* translate the comment

* translation

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* chore: sync ant-design v4.15.0 (#1281)

* feat: add built-in themes (#1286)

* feat: add themes

* add docs theming styles

* fix the RTL for FixedWidgets

* fix aliyun theme

* fix docs style

* feat(module: form): Form lable supports left alignment (#1292)

* feat: Form lable supports left alignment

* Update and rename components/grid/Col.razor.cs to 组件/格网/Col.razor.cs

* Delete Col.razor.cs

* no message

* PR:1292

* typo LabelAlign

* add the property in Col instead FormItem

* clean code

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): missing and new event (#1302)

* feat(module:upload): missing and new event

* docs(module:upload): new events (missing Chinese)

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* refactor: unified use of FeedbackComponent for modal comfirm and drawer  (#1263)

* refactor: support to use the same template for confirm and modal

* refactor: support to use the same template for drawer

* refactor: separate interface IOkCancelRef

* chore: modify EventUtil class summary

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: alert): add message template and loop banner demo (#1250)

* feat(Alert): added alert loop component

* fix: move cmp into main

* feat: add parameters for looping text

* feat: add new messages loop

* fix: create new internal looptext cmp

* doc: add demo

* doc: add demo markdown

* doc: update alert api

* doc: update cn docs

* fix: add missing dependency

* fix: update param name

* impleement loop text with css

* fix the document

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: table): add support for Display attribute (#1310)

feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes #1278

* test: add TestKit for public tests (#1248)

* test: change folder structure and add new TestKit csproj for public testing of AntDesign-based applications

* docs: added CN and EN docs about TestKit

* fix doc translate

* change the directory structure

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: space): add wrap, split and size array (#1314)

* fix(module: datepicker): incorrect in RTL mode (#1300)

* fix(module: dropdown): default PlacementType is incorrect in RTL mode

* fix(module: datepicker): not correct in RTL mode

* fix(module: datepicker): styles is incorrect when switch to LTR from RTL

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* docs: fix default css link (#1318)

* fix(module: table): bring PR1208 to PR1303 merge master into feature (#1326)

* feat(module: pagination): add TotalBoundaryShowSizeChanger parameter (#1325)

* feat(module: pagination): add TotalBoundaryShowSizeChanger

* docs(module: pagination): update API

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* docs: dynamic primary color changing (#1332)

* feat(docs): change color dynamically

* docs: dynamic primary color changing

* fix file path

* delete the script

* feat(module: table): add build-in filters (#1267)

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* fix demo and docs

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* fix(module: tooltip): wrong popup direction (#1348)

* fix merge conflicts

Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: LingDev <lingjing0921@live.com>
Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: TimChen <TimChen44@users.noreply.github.com>
Co-authored-by: unsung189 <52531536+unsung189@users.noreply.github.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Leishi <lluo@octet.com>
Co-authored-by: YMohd <31305504+YMohd@users.noreply.github.com>
ElderJames pushed a commit that referenced this issue Apr 23, 2022
feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes #1278
ElderJames added a commit that referenced this issue Apr 23, 2022
* feat(module: table): add a method to get query model (#1202)

* feat(module: table): add OnExpand event (#1208)

* feat(module: table): add summary (#1218)

* feat(module: table): add summary row

* feat: add fixed summary cell

* feat(module: InputNumber): Add long-click and keyboard operation (#1235)

* feat(module: InputNumber): Add long click and keyboard event

1. When hold mouse down button will always trigger the increase or decrease
2. Add event listener to "ArrowUp" and "ArrowDown" key

* feat(module: InputNumber): Add long click and keyboard event

1. When hold mouse down button will always trigger the increase or decrease
2. Add event listener to "ArrowUp" and "ArrowDown" key

* fix null reference exception

Co-authored-by: ElderJames <shunjiey@hotmail.com>

* refactor(module: pagination): cover the apis of react (#1220)

* feat(module: config-provider): support RTL (#1238)

* feat(module: config-provider): support RTL

* add rtl for each component

* fix rtl for pagination

* add rtl for overlay

* chore: sync ant-design v4.14.0 (#1249)

* feat(module: tag): add closing event (#1268)

* tag add onclosing
event

* clean code

* translate the comment

* translation

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* chore: sync ant-design v4.15.0 (#1281)

* feat: add built-in themes (#1286)

* feat: add themes

* add docs theming styles

* fix the RTL for FixedWidgets

* fix aliyun theme

* fix docs style

* feat(module: form): Form lable supports left alignment (#1292)

* feat: Form lable supports left alignment

* Update and rename components/grid/Col.razor.cs to 组件/格网/Col.razor.cs

* Delete Col.razor.cs

* no message

* PR:1292

* typo LabelAlign

* add the property in Col instead FormItem

* clean code

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): missing and new event (#1302)

* feat(module:upload): missing and new event

* docs(module:upload): new events (missing Chinese)

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* refactor: unified use of FeedbackComponent for modal comfirm and drawer  (#1263)

* refactor: support to use the same template for confirm and modal

* refactor: support to use the same template for drawer

* refactor: separate interface IOkCancelRef

* chore: modify EventUtil class summary

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: alert): add message template and loop banner demo (#1250)

* feat(Alert): added alert loop component

* fix: move cmp into main

* feat: add parameters for looping text

* feat: add new messages loop

* fix: create new internal looptext cmp

* doc: add demo

* doc: add demo markdown

* doc: update alert api

* doc: update cn docs

* fix: add missing dependency

* fix: update param name

* impleement loop text with css

* fix the document

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: table): add support for Display attribute (#1310)

feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes #1278

* test: add TestKit for public tests (#1248)

* test: change folder structure and add new TestKit csproj for public testing of AntDesign-based applications

* docs: added CN and EN docs about TestKit

* fix doc translate

* change the directory structure

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: space): add wrap, split and size array (#1314)

* fix(module: datepicker): incorrect in RTL mode (#1300)

* fix(module: dropdown): default PlacementType is incorrect in RTL mode

* fix(module: datepicker): not correct in RTL mode

* fix(module: datepicker): styles is incorrect when switch to LTR from RTL

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* docs: fix default css link (#1318)

* fix(module: table): bring PR1208 to PR1303 merge master into feature (#1326)

* feat(module: pagination): add TotalBoundaryShowSizeChanger parameter (#1325)

* feat(module: pagination): add TotalBoundaryShowSizeChanger

* docs(module: pagination): update API

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* docs: dynamic primary color changing (#1332)

* feat(docs): change color dynamically

* docs: dynamic primary color changing

* fix file path

* delete the script

* feat(module: table): add build-in filters (#1267)

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* fix demo and docs

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* fix(module: tooltip): wrong popup direction (#1348)

* fix merge conflicts

Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: LingDev <lingjing0921@live.com>
Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: TimChen <TimChen44@users.noreply.github.com>
Co-authored-by: unsung189 <52531536+unsung189@users.noreply.github.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Leishi <lluo@octet.com>
Co-authored-by: YMohd <31305504+YMohd@users.noreply.github.com>
ElderJames pushed a commit that referenced this issue Apr 30, 2022
feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes #1278
ElderJames added a commit that referenced this issue Apr 30, 2022
* feat(module: table): add a method to get query model (#1202)

* feat(module: table): add OnExpand event (#1208)

* feat(module: table): add summary (#1218)

* feat(module: table): add summary row

* feat: add fixed summary cell

* feat(module: InputNumber): Add long-click and keyboard operation (#1235)

* feat(module: InputNumber): Add long click and keyboard event

1. When hold mouse down button will always trigger the increase or decrease
2. Add event listener to "ArrowUp" and "ArrowDown" key

* feat(module: InputNumber): Add long click and keyboard event

1. When hold mouse down button will always trigger the increase or decrease
2. Add event listener to "ArrowUp" and "ArrowDown" key

* fix null reference exception

Co-authored-by: ElderJames <shunjiey@hotmail.com>

* refactor(module: pagination): cover the apis of react (#1220)

* feat(module: config-provider): support RTL (#1238)

* feat(module: config-provider): support RTL

* add rtl for each component

* fix rtl for pagination

* add rtl for overlay

* chore: sync ant-design v4.14.0 (#1249)

* feat(module: tag): add closing event (#1268)

* tag add onclosing
event

* clean code

* translate the comment

* translation

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* chore: sync ant-design v4.15.0 (#1281)

* feat: add built-in themes (#1286)

* feat: add themes

* add docs theming styles

* fix the RTL for FixedWidgets

* fix aliyun theme

* fix docs style

* feat(module: form): Form lable supports left alignment (#1292)

* feat: Form lable supports left alignment

* Update and rename components/grid/Col.razor.cs to 组件/格网/Col.razor.cs

* Delete Col.razor.cs

* no message

* PR:1292

* typo LabelAlign

* add the property in Col instead FormItem

* clean code

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): missing and new event (#1302)

* feat(module:upload): missing and new event

* docs(module:upload): new events (missing Chinese)

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* refactor: unified use of FeedbackComponent for modal comfirm and drawer  (#1263)

* refactor: support to use the same template for confirm and modal

* refactor: support to use the same template for drawer

* refactor: separate interface IOkCancelRef

* chore: modify EventUtil class summary

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: alert): add message template and loop banner demo (#1250)

* feat(Alert): added alert loop component

* fix: move cmp into main

* feat: add parameters for looping text

* feat: add new messages loop

* fix: create new internal looptext cmp

* doc: add demo

* doc: add demo markdown

* doc: update alert api

* doc: update cn docs

* fix: add missing dependency

* fix: update param name

* impleement loop text with css

* fix the document

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: table): add support for Display attribute (#1310)

feat(module:table): add support for Display attribute

Display attribute is widely used to specify display text for entity properties.
Table component should get column names from Display attribute instances.

Closes #1278

* test: add TestKit for public tests (#1248)

* test: change folder structure and add new TestKit csproj for public testing of AntDesign-based applications

* docs: added CN and EN docs about TestKit

* fix doc translate

* change the directory structure

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: space): add wrap, split and size array (#1314)

* fix(module: datepicker): incorrect in RTL mode (#1300)

* fix(module: dropdown): default PlacementType is incorrect in RTL mode

* fix(module: datepicker): not correct in RTL mode

* fix(module: datepicker): styles is incorrect when switch to LTR from RTL

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* docs: fix default css link (#1318)

* fix(module: table): bring PR1208 to PR1303 merge master into feature (#1326)

* feat(module: pagination): add TotalBoundaryShowSizeChanger parameter (#1325)

* feat(module: pagination): add TotalBoundaryShowSizeChanger

* docs(module: pagination): update API

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* docs: dynamic primary color changing (#1332)

* feat(docs): change color dynamically

* docs: dynamic primary color changing

* fix file path

* delete the script

* feat(module: table): add build-in filters (#1267)

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* tablefilter-moreoptions

* fix demo and docs

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* fix(module: tooltip): wrong popup direction (#1348)

* fix merge conflicts

Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: LingDev <lingjing0921@live.com>
Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: TimChen <TimChen44@users.noreply.github.com>
Co-authored-by: unsung189 <52531536+unsung189@users.noreply.github.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Leishi <lluo@octet.com>
Co-authored-by: YMohd <31305504+YMohd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants