mazdik / ng-mazdik

Angular UI component library
https://mazdik.github.io/ng-mazdik
MIT License
89 stars 34 forks source link

Columns from object #9

Closed ahmedsaidzahran closed 6 years ago

ahmedsaidzahran commented 6 years ago

If i want to bind column field from inner object like this { "areaId": 1, "areaName": "Area 1", "areaCode": "002", "clientId": 1, "client": { "clientId": 1, "clientName": "South Beach", "clientCode": "0001" } } how bind clientName

mazdik commented 6 years ago

deep value try {title: 'Client name', name: 'client.clientName'} also other fields: {title: 'Client code', name: 'client.clientCode'}, {title: 'Client id', name: 'client.clientId'}

ahmedsaidzahran commented 6 years ago

I did that but also not working

On Sun, Sep 9, 2018 at 11:23 AM mazdik notifications@github.com wrote:

deep value https://github.com/mazdik/ng-crud-table/commit/774f843b1243bfcc1b5ffcbf9c8338c3ae4d968f try {title: 'Client name', name: 'client.clientName'} also other fields: {title: 'Client code', name: 'client.clientCode'}, {title: 'Client id', name: 'client.clientId'}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mazdik/ng-crud-table/issues/9#issuecomment-419699202, or mute the thread https://github.com/notifications/unsubscribe-auth/AQuwnLmsMFY08-fJIDTJH2eYbRY4bCsmks5uZNAbgaJpZM4Wf3qp .

-- Thank You..

Eng. Ahmed Said

mazdik commented 6 years ago

Have you downloaded the latest version? git pull

ahmedsaidzahran commented 6 years ago

I download it last friday

On Sun, Sep 9, 2018 at 11:31 AM mazdik notifications@github.com wrote:

Have you downloaded the latest version? git pull

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mazdik/ng-crud-table/issues/9#issuecomment-419699571, or mute the thread https://github.com/notifications/unsubscribe-auth/AQuwnKlxpJTyApvrSlBVTK9GEnYY7x00ks5uZNHMgaJpZM4Wf3qp .

-- Thank You..

Eng. Ahmed Said

mazdik commented 6 years ago

I added this feature today

ahmedsaidzahran commented 6 years ago

Thank you for your effort m, i will try and get back to you, Also please about type ‘select’ Options att can take json object from api or not

On Sun, Sep 9, 2018 at 11:52 AM mazdik notifications@github.com wrote:

I added this feature today

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mazdik/ng-crud-table/issues/9#issuecomment-419700664, or mute the thread https://github.com/notifications/unsubscribe-auth/AQuwnMkExR-DszS5OwFiFNAYeAjpVWZCks5uZNbggaJpZM4Wf3qp .

-- Thank You..

Eng. Ahmed Said

mazdik commented 6 years ago

For editable cell? this.table.columns[3].options = data;

In dynamic forms getOptions?(url: string, parentId: any): Promise {title: '', name: '', optionsUrl: 'assets/options.json'}

ahmedsaidzahran commented 6 years ago

I am very grateful for your response

On Sun, Sep 9, 2018 at 1:39 PM mazdik notifications@github.com wrote:

For editable cell? this.table.columns[3].options = data;

In dynamic forms getOptions?(url: string, parentId: any): Promise {title: '', name: '', optionsUrl: 'assets/options.json'}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mazdik/ng-crud-table/issues/9#issuecomment-419706520, or mute the thread https://github.com/notifications/unsubscribe-auth/AQuwnHu5XA9Xrpt75mYW7ru2K7Uysw3Wks5uZO_lgaJpZM4Wf3qp .

-- Thank You..

Eng. Ahmed Said

ahmedsaidzahran commented 6 years ago

about option in dynamic form you mean something like this title: 'Client', name: 'client.clientName', width: 250, editable: true, type: 'select', options: '{title: '', name: '', optionsUrl: ' http://localhost/CAFM.API/getOptions'}'

On Sun, Sep 9, 2018 at 1:39 PM mazdik notifications@github.com wrote:

For editable cell? this.table.columns[3].options = data;

In dynamic forms getOptions?(url: string, parentId: any): Promise {title: '', name: '', optionsUrl: 'assets/options.json'}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mazdik/ng-crud-table/issues/9#issuecomment-419706520, or mute the thread https://github.com/notifications/unsubscribe-auth/AQuwnHu5XA9Xrpt75mYW7ru2K7Uysw3Wks5uZO_lgaJpZM4Wf3qp .

-- Thank You..

Eng. Ahmed Said

mazdik commented 6 years ago

title: 'Client', name: 'client.clientName', width: 250, editable: true, type: 'select', optionsUrl: 'http://localhost/CAFM.API/getOptions', Demo: https://github.com/mazdik/ng-crud-table/blob/774f843b1243bfcc1b5ffcbf9c8338c3ae4d968f/src/app/demo/columns.ts#L90 https://github.com/mazdik/ng-crud-table/blob/master/src/app/demo/basic-demo.component.ts

ahmedsaidzahran commented 6 years ago

Great I tried it yesterday and it worked fine, thanks

On Mon, Sep 10, 2018 at 8:06 AM mazdik notifications@github.com wrote:

title: 'Client', name: 'client.clientName', width: 250, editable: true, type: 'select', optionsUrl: 'http://localhost/CAFM.API/getOptions', Demo:

https://github.com/mazdik/ng-crud-table/blob/774f843b1243bfcc1b5ffcbf9c8338c3ae4d968f/src/app/demo/columns.ts#L90

https://github.com/mazdik/ng-crud-table/blob/master/src/app/demo/basic-demo.component.ts

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mazdik/ng-crud-table/issues/9#issuecomment-419788461, or mute the thread https://github.com/notifications/unsubscribe-auth/AQuwnBOvARfTzQl9-HwcUxzEbs9AgJ7Dks5uZfNTgaJpZM4Wf3qp .

-- Thank You..

Eng. Ahmed Said