Reputation: 3788
This is a sample of my three columns. I want to customize the width sizes.
resetPassword: {
title: this.gridTittle["ResetPassword"],
type: 'custom',
renderComponent: UserPasswordResetComponent,
filter: false
},
userName: {
title: this.gridTittle["UserName"],
},
roleTypeDescription: {
title: this.gridTittle["UserType"],
type: 'text',
filter: false
},
Upvotes: 3
Views: 15875
Reputation: 1096
I was not able to make it work with the column attribute.
My solution is:
:host {
::ng-deep .yourColumnName .ng2-smart-title {
width: 100px;
}
}
or
:host {
::ng-deep .ng2-smart-title {
min-width: 150px;
}
}
You have a thread here with it
Upvotes: 0
Reputation: 123
Important >> this value of widht between quotation marks
columns: {
id: {
title: '#',
type: 'string',
sortDirection: 'desc',
width: '30px'
},
name: {
title: 'Nome',
type: 'string',
},
lastName: {
title: 'Sobrenome',
type: 'string',
},
username: {
title: 'Usuário',
type: 'string',
}
}
Upvotes: 0
Reputation: 1307
You can use the width property. As the documentation, "column width example: '20px', '20%'". In your code:
resetPassword: {
title: this.gridTittle["ResetPassword"],
type: 'custom',
renderComponent: UserPasswordResetComponent,
filter: false,
width: 25%
},
userName: {
title: this.gridTittle["UserName"],
width: 25%
},
roleTypeDescription: {
title: this.gridTittle["UserType"],
type: 'text',
filter: false,
width: 50%
},
Upvotes: 7