Hi Sierd Weidema,
You can achieve your requirement by setting the “columnChooserSettings.operator”
property as “contains”. Please refer to the below code example and the API
link for more information.
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.parentData). Columns(col =>
{
. . .
}).ShowColumnChooser(true).Toolbar(new List<string>(){ "ColumnChooser"}).Load("load"). Render()
<script>
function load() {
var grid = document.getElementById('Grid').ej2_instances[0];
grid.columnChooserSettings = { operator: "contains" };
}
</script>
|
https://ej2.syncfusion.com/documentation/api/grid/columnChooserSettings/#operator
https://ej2.syncfusion.com/documentation/api/grid#load
Please get back to us if you need further assistance on this.
Regards,
Pavithra S