Custom style for datatable

Hi,

I have a form with many datatable controls, but I want to change the style of only one of them.
Namely, I want to hide the toolbar.

I found that it can be hide with CSS code, but it works for all my datatables from the form, but I need only for one:

.k-grid-toolbar {
display:none!important;
}

Is it possible ?
Thank you in advance.

I fround an example how to hide the toolbox from this page

I tried unsuccessfully this code:

fd.spRendered(function() {
fd.control('dtRoles').widget.setOptions({ toolbar: [ { name: "create", visible: false} ], });
});

dtRoles - is the internal name of my DataTable.

I found the solution:

fd.spRendered(function() {
var gridRoles = fd.control('dtRoles').widget;
gridRoles.element.find(".k-grid-toolbar").hide();
});

1 Like