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

Add feature: Entity dependent edit drop down options #2326

Merged
merged 1 commit into from Dec 14, 2014

Conversation

@wgorder
Copy link
Contributor

wgorder commented Dec 11, 2014

Add the ability to populate cell drop dowmn menus from the row.entity by providing a path
to an options array on the entity. This allows for options to differ on a row by row basis.

closes #2309

Add the ability to populate cell drop dowmn menus from the row.entity by providing a path
to an options array on the entity. This allows for options to differ on a row by row basis.

closes #2309
@wgorder
Copy link
Contributor Author

wgorder commented Dec 14, 2014

paging @PaulL1

Does this looks like good, any recommended adjustments? I think this could be useful in many use cases.

@PaulL1
Copy link
Contributor

PaulL1 commented Dec 14, 2014

Looks good. Thanks for the contribution, I have merged.

PaulL1 added a commit that referenced this pull request Dec 14, 2014
Add feature: Entity dependent edit drop down options
@PaulL1 PaulL1 merged commit ea53c31 into angular-ui:master Dec 14, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@chandanjena
Copy link

chandanjena commented Dec 2, 2016

I have a simple requirement. I am using angular ui-grid to display records fetched from database. I have a drop down field named Status. This drop down values are A, B, C, D, E. I need to display all the values if the logged in user ($scope.profile = Admin) is Admin. But if the user is Supervisor ($scope.profile = Supervisor) then, only A,B and C should be visible in the drop-down.
How can I achieve this? I'm very new to Angular as you could have found by now.

here is my columnDefs for the drop-down.
{ name: 'Status', field: 'Status', displayName: 'Status', editableCellTemplate: 'ui-grid/dropdownEditor',
cellFilter: 'mapStatus', editDropdownValueLabel: 'status', editDropdownOptionsArray: [
{ id: 'A', status: 'A' },
{ id: 'B', status: 'B' },
{ id: 'C', status: 'C' },
{ id: 'D', status: 'D' },
{ id: 'E', status: 'E' }]
}

Thnaks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.