Hi Derek
Greetings from Syncfusion support.
It is not possible to define the auto fit column configuration at the server side. However we can override the grid method to auto fit columns by default for all grids using the below code example.
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js" type="text/javascript"></script>
<script>
var old = ej.grids.Grid.prototype.wireEvents;
ej.grids.Grid.prototype.wireEvents = function() {
old.apply(this, arguments);
this.on('content-ready', function() {
this.autoFitColumns();
}, this);
}
</script> |
By placing this code example after the Syncfusion script reference, there is no need to configure the grid at client side/server side to auto fit its column.
Regards,
Thavasianand S.