<EjsGrid id="Grid" AllowPaging="true" ShowColumnChooser="true" toolbar="@(new List<string>() { "ColumnChooser" })">
<EjsDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></EjsDataManager>
<GridColumns>
<GridColumn Field="OrderID" HeaderText="Order ID" ISPrimaryKey="true" TextAlign="@Syncfusion.EJ2.RazorComponents.Grids.TextAlign.Right" Width="90"></GridColumn>
<GridColumn Field="CustomerID" HeaderText="First Name" Width="90"></GridColumn>
<GridColumn Field="EmployeeID" HeaderText="Employee ID" Width="90"></GridColumn>
<GridColumn Field="Freight" HeaderText="Freight" Width="90"></GridColumn>
</GridColumns>
</EjsGrid> |
|
Sorry, I don't know how to achive this:
How can we hide e.g. column "OrderID" on very first load, but allow to be displayed via
ShowColumnChooser , when a user wants that later on?
By setting visible=false we cannot show it later any more, it remains hidden forever, no matter whether one switches this column to ON in the
ShowColumnChooser
:
<GridColumn Field="OrderID" HeaderText="Order ID" Visible="false">GridColumn>
Hi Volker
Greetings from Syncfusion support.
We checked your query and we suspect when grid is render particular column set as visible is false later based on user , it could be showed on columnchoser . we prepared sample as per the requirement and attached in this ticket .
Please refer the attached sample for your reference .
Please get back to us if you need further assistance
Regards,
Naveen Palanivel