Sample Code: Component: <aura:component implements = "force:appHostable" controller = "AccountListController"> <aura:attribute type = "object[]" name = "acctList"/> <aura:attribute name = "mycolumns" type = "List"/> <aura:handler name = "init" value="{!this}" action="{!c.onInit}"/> <lightning:datatable aura:id = "acctTable" data = "{! v.acctList }" columns = "{! v.mycolumns }" keyField = "Id" hideCheckboxColumn = "true" onrowaction = "{! c.viewRecord }"/> </aura:component> Controller: ({ onInit : function( component, event, helper ) { component.set( 'v.mycolumns', [ {label: 'Account Name', fieldName: 'Name', type: 'text', editable:'true'}, {label: 'Industry', fieldName: 'Industry', type: 'text'}, {label: 'Type', fieldName: 'Type', type: 'Text'}, {type: "button", typeAttributes: { label: 'View', ....