According to TheUknown, I find it more convenient to directly write your CSS rules.
Alternatively, you can also utilize the 'style' attribute on various elements like grids, columns, or records.
Check out this example :
jsfiddle link
$('#myGrid').w2grid({
name : 'myGrid',
columns: [
{ field: 'fname', caption: 'First Name', size: '30%', style : 'border: 1px solid blue' },
{ field: 'lname', caption: 'Last Name', size: '30%', style : 'font-weight: bold' },
{ field: 'email', caption: 'Email', size: '40%' },
{ field: 'sdate', caption: 'Start Date', size: '120px' },
],
records: [
{ recid: 1, fname: 'John', lname: 'Doe', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cea4aaa1ab8ea9a3afa7a2e0ada1a3">[email protected]</a>', sdate: '4/3/2012', style : 'border: 1px solid green' },
{ recid: 2, fname: 'Stuart', lname: 'Motzart', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7b111f141e3b1c161a121755181416">[email protected]</a>', sdate: '4/3/2012' },
{ recid: 3, fname: 'Jin', lname: 'Franson', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="99f3fdf6fcd9fef4f8f0f5b7faf6f4">[email protected]</a>', sdate: '4/3/2012' }
],
style : 'border: 1px solid red'
});