Hi Rohit,
We suspect that you are using a Column Resizing feature of the Grid. Usually, Column Resizer (AllowResizing) of the Grid works in three ways, such as
1) Resize the columns based on alternative columns (NextColumn),
2) Resize columns based on Control Width (Control).
3) Resize the columns based on all the columns (Normal).
These functionalities can be accessed by the ResizeSettings=>ResizeMode property API of the Grid. Refer to the following API reference section.
Upto v14.3.0.32, the default ResizeMode (of ResizeSettings) is NextColumn. So the column will be resized based on the alternative columns. From the v14.3.0.49, we have changed the default value to the Normal.
@(Html.EJ().Grid<OrdersView>("Events")
.Datasource(ds => ds.Json(ViewBag.dataSource))
.AllowPaging()
.AllowResizing()
.AllowScrolling()
.ResizeSettings(resize =>
resize.ResizeMode(ResizeMode.Normal))//default value
) |
You can download our latest version of Essential Studio from the following link.
If you would like to continue with the older version of Essential Studio, please use the following code example to resize the column based on all the columns.
@(Html.EJ().Grid<OrdersView>("Events")
.Datasource(ds => ds.Json(ViewBag.dataSource))
.AllowPaging()
.AllowResizing()
.AllowScrolling()
.ClientSideEvents(events => events.Load("onLoad"));
)
<script>
function onLoad(args) {
this.model.resizeSettings.resizeMode = ej.Grid.ResizeMode.Normal;
}
</script> |
Note: By default, when resizing the column, Grid will hide the collection of columns from last index (if large number of columns). To overcome this behavior, you have to enable the AllowScrolling (as shown above).
Regards,
Seeni Sakthi Kumar S.