akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 876 forks source link

How to add a check box "select all" in table header ? #328

Open jeromethibault opened 7 years ago

jeromethibault commented 7 years ago

I find this component in the repository : ng2-smart-table/src/ng2-smart-table/components/thead/cells/checkbox-select-all.component.ts

But i don't figure out how to use it. Does anyone have an idea ?

RoryGarner92 commented 7 years ago

settings = { actions: false, pager: { display: true, perPage: 14 }, selectMode: 'multi', //to add multi row check box's columns: {

jeevitha8123 commented 7 years ago

how to do bulk action in ng2 smart table

jeevitha8123 commented 7 years ago

hi anyone please help me for a bulk action in ng2 smart table my source is . settings = {

   selectMode : 'multi',
   mode: 'external',
    columns: {
         name: {
            title: 'Name',
        },
        branch_name: {
            title: 'Branch',
        },
        ifsc: {
            title: 'IFSC',
            width:'15%',

        },
        status_name: {
            title: 'Status',
        },

    },
     actions: {

        columnTitle: 'Actions',
        add: false,
        edit: true,
        delete: true,
        position: 'right',

    },

    pager: {
        display: true,
        perPage: 10,

    },
    edit: {
        editButtonContent: '<img src="img/edit.png"/>'
    },
    delete: {
        deleteButtonContent: '<img src="img/delete.png"/>'
    },
fmpierce commented 6 years ago

@jeevitha8123 ,

Looks like you have the select boxes set up. Now you just need to use (userRowSelect)="userSelectRows($event.selected)" in to build the list.

userSelectRows(selectedList) { this.selected = selectedList; }

Then make a button that calls a function that does something with the list.

t0nyak commented 5 years ago

Hi guys.

Regarding title of the issue, I guess mine goes here.

I got a custom column using custom cell components and it works great but I need to set as title of the column a checkbox instead of a text.

Actually, I could use directly the existing component of CheckboxSelectAllComponent, but I'm not able to figure out how.

Some help would be highly appreciated!