ng2-smart-table

Ng2-smart-table : Use drop-downs or date pickers in inline editing

你。 提交于 2019-12-12 11:22:49
问题 I was searching for a better table representation for Angular2 and found ng2-smart-table is good to use. But the problem is it doesn't seems to provide a direct way to use drop downs or date pickers in in-line editing. Is there any way to make it possible or what alternative components I can have to represent a table view in my Angular2 app. 回答1: I found something like this for drop-downs: private settings = { columns: { name: { title: 'Name' }, valid: { title: 'Valid', type: 'html', editor:

Angular 4 , 'this' is undefined when using callback 'onComponentInitFunction' function of ng2-smart table

荒凉一梦 提交于 2019-12-11 03:52:16
问题 I am using ng2-smart-table in my component. I am trying to invoke the parent component's approveTheOrder() method but I am unable to get the object of the parent class Below is the snippet { title: "Actions", type: "custom", renderComponent: ActionRenderComponent, onComponentInitFunction(instance) { instance.actionEmitter.subscribe(row => { if(row == CONSTANT.STATUS_APPROVE){ //here 'row' value is from childComponent-ActionRenderComponent,which I am able to get easily in parentComponet this

Click function in ng2-smart-table column

亡梦爱人 提交于 2019-12-08 09:31:14
问题 I have been trying to get a click function to be included in a ng2-smart-table column. It seems angular (click) event and javascipt "onclick" do not get rendered in the table. The code is below public settings = { selectMode: 'single', //single|multi hideHeader: false, hideSubHeader: false, actions: { columnTitle: 'Actions', add: false, edit: false, // true, delete: false, // true, custom: false }, noDataMessage: 'No data found', columns: { IsComplete: { title:'Status', type:'html', filter:

Add custom action button - ng2-smart-table

邮差的信 提交于 2019-12-07 11:31:57
问题 I'm trying to add a button to custom action, but a new column is not added in the action, making the button overlap with the others. Code: settings = { actions: { custom: [ { name: 'Button', title: 'Button ', } ], }, columns: { name: { title: 'Full name' }, email: { title: 'Email' }, lastLogin: { title: 'Last Login' } } }; I needed to put a link to the image, because I have little reputation here and the image tool is blocked for me. reaction image: What am I doing wrong? 回答1: you can try

How to select multiple rows in ng2-smart-table component with checkbox?

假如想象 提交于 2019-12-04 11:56:11
I am using ng2-smart-table from https://akveo.github.io/ng2-smart-table/#/documentation Live Demo: http://akveo.com/ngx-admin/pages/tables/smart-table Please help me with below questions: I want to select multiple rows and call one function so where I need to write this code in ng2-smart-table? Can I select multiple rows and call one function on selected rows ? I have written below code in .ts and .html files: smart-table-component.ts: actions: { add: false, edit: true, delete: false, custom: [{ name: 'ourCustomAction'}], position: 'left', columnTitle: 'Actions' }, mode: 'external', smart