mdDataTable
mdDataTable copied to clipboard
how to put ng-click or a href to the mddatatable
i have a code like this
mdt-table sortable-columns="true" animate-sort-icon="true" ripple-effect="true" table-card="{title: ctrl.data[ ctrl.selected_index ].label, actionIcons: true}" mdt-row="{'data': filteredItems,'table-row-id-key': 'key','column-keys': ['first_name', 'last_name', 'branch.name', 'department.name', 'email', 'employment_status.kind']}"
mdt-header-row mdt-column align-rule="center" First Name mdt-column align-rule="center" Last Name mdt-column align-rule="center" Branch Name mdt-column align-rule="center" Department Name mdt-column align-rule="center" Email mdt-column align-rule="center" Status
where can i put some ng-click or a href to get the id and redirect that person in to another view thanks
Look at these example: http://codepen.io/iamisti/pen/pbLYwq
Or mine:
<mdt-custom-cell column-key="id">
<i class="material-icons" title="Ver" ng-click="clientScope.showView($event, rowId)">search</i>
<i class="material-icons" title="Editar" ng-click="clientScope.showEdit($event, rowId)">create</i>
<i class="material-icons" title="Eliminar" ng-click="clientScope.showDelete($event, rowId)">delete</i>
</mdt-custom-cell>
Did the above example help?
is there possible to click the one whole row????
hmm interesting, no there is no callback for that, but if you need it we can put that in. There were no need for that yet.
Any reason why you closed the ticket?
#201
I added the feature here : https://github.com/rvt/mdDataTable/commit/627bb8b5449cadb600836481fa7d2327060d8aac
iamisti, let me know if this is complete and for your style of programming. I also updated readme.
<md-row *cdkRowDef="let row; columns: displayedColumns;" (click)="showit(row)"></md-row>