There's a problem hiding the columns on the grid.

hi, syncfusion team




There are two problems hiding the heat from the grid.


This is the first question.


If you uncheck all columns as follows and erase them, all columns will be erased without remaining columns.


all clear.png


However, when one column is selected and erased, one specific column leaves the remaining part.


Remaining.png


Remaining1.png




This is the second question.




I used this demo to carry out this.


https://ej2.syncfusion.com/aspnetcore/Grid/ShowHideColumn#/bootstrap5




This demo hides one column, so the speed is not slow.


However, the sauce I made is very slow because it hides several columns at once.




Please check if there is a way to improve this part.


(Click the check box and it takes 2-3 seconds.)








//cshtml


<div style="padding-bottom: 10px;">


        <ejs-checkbox id="checkBD" checked="true" change="onChange" label="BLDG"></ejs-checkbox>


        <ejs-checkbox id="checkWL" checked="true" change="onChange" label="WALL"></ejs-checkbox>


        <ejs-checkbox id="checkDW" checked="true" change="onChange" label="DOOR&WINDOW"></ejs-checkbox>


        <ejs-checkbox id="checkHD" checked="true" change="onChange" label="HEAT DISPP."></ejs-checkbox>


        <ejs-checkbox id="checkFA" checked="true" change="onChange" label="F.A"></ejs-checkbox>


        <ejs-checkbox id="checkAB" checked="true" change="onChange" label="AIR BALANCE"></ejs-checkbox>


        <ejs-checkbox id="checkSL" checked="true" change="onChange" label="SPC LOAD"></ejs-checkbox>


        <ejs-checkbox id="checkPL" checked="true" change="onChange" label="PLMB"></ejs-checkbox>


    </div>


 <ejs-grid id="DataInputGrid" dataSource="@ViewBag.datasource" gridLines="Both" rowHeight="30" height="520px" frozenColumns="4" frozenRows="2">


        <e-grid-columns>


            <e-grid-column headerText="ARCHITECTURAL INFORMATION" headerTextAlign="Center" textAlign="Center"


                           columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {


                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "ROOM INFORMATION", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_KEY", Width = "100", HeaderText = "KEY", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "ROOM_NO", Width = "100", HeaderText = "ROOM NO.", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_SYS_NM", Width = "120", HeaderText = "AIR SYSTEM NAME", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_NM", Width = "100", HeaderText = "ROOM NAME", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_AREA", Width = "130", HeaderText = "ROOM AREA (m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_WIDTH", Width = "100", HeaderText = "WIDTH(m)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_LGTH", Width = "100", HeaderText = "LENGTH(m)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_CLG_HGT", Width = "130", HeaderText = "CEILING HEIGHT(m)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_FULL_HGT", Width = "120", HeaderText = "FULL HEIGHT(m)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_VOL", Width = "130", HeaderText = "ROOMVOLUME(m3)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "RM_NO_OF_OCC", Width = "150", HeaderText = "NUMBER OF OCCUPANCY", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "OUTER WALL LENGTH", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_N", Width = "100", HeaderText = "N", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_E", Width = "100", HeaderText = "E", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_S", Width = "100", HeaderText = "S", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_W", Width = "100", HeaderText = "W", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_NE", Width = "100", HeaderText = "NE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_NW", Width = "100", HeaderText = "NW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_SE", Width = "100", HeaderText = "SE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWL_SW", Width = "100", HeaderText = "SW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "OUTER WALL AREA", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_N", Width = "100", HeaderText = "N", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_E", Width = "100", HeaderText = "E", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_S", Width = "100", HeaderText = "S", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_W", Width = "100", HeaderText = "W", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_NE", Width = "100", HeaderText = "NE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_NW", Width = "100", HeaderText = "NW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_SE", Width = "100", HeaderText = "SE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "OWA_SW", Width = "100", HeaderText = "SW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "DOOR Q'ty", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_N", Width = "100", HeaderText = "N", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_E", Width = "100", HeaderText = "E", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_S", Width = "100", HeaderText = "S", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_W", Width = "100", HeaderText = "W", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_NE", Width = "100", HeaderText = "NE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_NW", Width = "100", HeaderText = "NW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_SE", Width = "100", HeaderText = "SE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "DOOR_QTY_SW", Width = "100", HeaderText = "SW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            }


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "WINDOW Q'ty", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_N", Width = "100", HeaderText = "N", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_E", Width = "100", HeaderText = "E", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_S", Width = "100", HeaderText = "S", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_W", Width = "100", HeaderText = "W", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_NE", Width = "100", HeaderText = "NE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_NW", Width = "100", HeaderText = "NW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_SE", Width = "100", HeaderText = "SE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "WIN_QTY_SW", Width = "100", HeaderText = "SW", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}}


                            }


                            }})">


            </e-grid-column>




            <e-grid-column headerText="HEAT DISSIPATION" headerTextAlign="Center" textAlign="Center"


                           columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {


                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "ELECTRIC", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_ELTR_WT", Width = "100", HeaderText = "HEAT DISSIPATION(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_ELTR_WT_AREA", Width = "100", HeaderText = "HEAT DISSPATION / AREA(Watt/m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "INSTRUMENT", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_ISTRM_WT", Width = "100", HeaderText = "HEAT DISSIPATION(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_ISTRM_WT_AREA", Width = "100", HeaderText = "HEAT DISSPATION / AREA(Watt/m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "TELECOM", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_TC_WT", Width = "100", HeaderText = "HEAT DISSIPATION(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_TC_WT_AREA", Width = "100", HeaderText = "HEAT DISSPATION / AREA(Watt/m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "ETC", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_ETC_WT", Width = "100", HeaderText = "HEAT DISSIPATION(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_ETC_WT_AREA", Width = "100", HeaderText = "HEAT DISSPATION / AREA(Watt/m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "TOTAL", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_TOTAL_WT", Width = "100", HeaderText = "TOTAL HEAT DISSIPATION(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "HD_TOTAL_WT_AREA", Width = "100", HeaderText = "TOTAL HEAT DISSPATION / AREA(Watt/m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            }})">


            </e-grid-column>




            <e-grid-column headerText="FRESH AIR SELECTION" headerTextAlign="Center" textAlign="Center"


                           columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {


                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "OCCUPANCY BASE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_OB_OCC_NO", Width = "100", HeaderText = "NUMBER OF OCCUPANCY", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_OB_OCC_UTFL", Width = "100", HeaderText = "UNIT FLOW (L/S/PERSON)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_OB_OCC_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_OB_OCC_CHK", Width = "100", HeaderText = "", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "AREA BASE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_AB_UTFL", Width = "100", HeaderText = "UNIT FLOW (L/S/m2)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_AB_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center} }


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_AB_CHK", Width = "100", HeaderText = "", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "FIXTURE UNIT BASE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_TILT_NO", Width = "100", HeaderText = "NUMBER OF TOILET", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_TILT_UNFW", Width = "100", HeaderText = "UNIT FLOW (L/S/TOILET)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_TILT_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_TILT_CHK", Width = "100", HeaderText = "Check", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_SHW_NO", Width = "100", HeaderText = "NUMBER OF SHOWER", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_SHW_UNFW", Width = "100", HeaderText = "UNIT FLOW (L/S/SHOWER)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_SHW_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center} }


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FUB_SHW_CHK", Width = "100", HeaderText = "Check", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "ΔP BASE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_DPB_DP", Width = "100", HeaderText = "ΔP", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_DPB_TIGHT", Width = "100", HeaderText = "TIGHTNESS", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_DPB_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center} }


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_DPB_CHK", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "ACH BASE", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_ACH", Width = "100", HeaderText = "ACH", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_ACH_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center} }


                                //new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_ACH_CHK", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "100% F.A", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FA_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            },




                            new Syncfusion.EJ2.Grids.GridColumn { HeaderText = "SELECTED MAX. F.A (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center, Columns = new List<Syncfusion.EJ2.Grids.GridColumn>(){


                                new Syncfusion.EJ2.Grids.GridColumn { Field = "FAS_FA_SELEC_FLRT", Width = "100", HeaderText = "FLOW RATE (L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}}


                            }})">


            </e-grid-column>




            <e-grid-column headerText="AIR BALANCE SUMMARY" headerTextAlign="Center" textAlign="Center"


                           columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_FRESH", Width = "100", HeaderText = "FRESH AIR(L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_SUPPLY", Width = "100", HeaderText = "SUPPLY AIR(L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_RETURN", Width = "100", HeaderText = "RETURN AIR(L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_OV_PRS", Width = "100", HeaderText = "OVER-PRESSURE(L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_EXHAUST", Width = "100", HeaderText = "EXHAUST AIR(L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "AIR_EXHAUST_CHK", Width = "100", HeaderText = "EXHAUST AIR(L/S)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}})">


            </e-grid-column>




            <e-grid-column headerText="SPACE HEAT LOAD" headerTextAlign="Center" textAlign="Center"


                           columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "SHL_CSLW", Width = "100", HeaderText = "COOLING SENSIBLE LOAD(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "SHL_CLLW", Width = "100", HeaderText = "COOLING LATENT LOAD(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "SHL_HSLW", Width = "100", HeaderText = "HEATING SENSIBLE LOAD(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "SHL_HLLW", Width = "100", HeaderText = "HEATING LATENT LOAD(Watt)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}


                            })">


            </e-grid-column>




            <e-grid-column headerText="PLUMBING FIXTURE" headerTextAlign="Center" textAlign="Center"


                           columns="@(new List<Syncfusion.EJ2.Grids.GridColumn>() {


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_VALV_WC", Width = "100", HeaderText = "WATER CLOSET (FLUSH VALVE)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_TANK_WC", Width = "100", HeaderText = "WATER CLOSET (FLUSH TANK)", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_FHPS", Width = "100", HeaderText = "FAUCET / HOSS BIBB / PERENNIAL SPRAY", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_URINAL", Width = "100", HeaderText = "URINAL", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_LAVATORY", Width = "100", HeaderText = "LAVATORY", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_SERVICE_SK", Width = "100", HeaderText = "SERVICE SINK", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_ABLUTION_TAP", Width = "100", HeaderText = "ABLUTION TAP", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_KITCHEN_SK", Width = "100", HeaderText = "KITCHEN SINK", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_DK_FOUNTAIN", Width = "100", HeaderText = "DRINKING FOUNTAIN", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_HUMIDIFIER", Width = "100", HeaderText = "HUMIDIFIER", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_E_WASHER", Width = "100", HeaderText = "EYE WASHER", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_E_WS", Width = "100", HeaderText = "EYE WASH & SHOWER", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center},


                            new Syncfusion.EJ2.Grids.GridColumn { Field = "PF_SHOWER", Width = "100", HeaderText = "SHOWER", TextAlign = Syncfusion.EJ2.Grids.TextAlign.Center}})">


            </e-grid-column>


        </e-grid-columns>


    </ejs-grid>




//script


function onChange(args) {


        //alert(args.event.currentTarget.id);




        var grid = document.getElementById("DataInputGrid").ej2_instances[0];


        var isState = args.checked;




        var Sdata = { CheckID: args.event.currentTarget.id, StateCheck: isState};


        $.ajax({


                url: "@Url.Action("ColumnChange", "IntegratedInformation")", //render the partial view


                type: "POST",


                contentType: "application/json",


                data: JSON.stringify(Sdata),


            success: function (data) {


                if (isState == true) {


                    for (var iCol = 0; iCol < data.length; iCol++) {


                        var columnName = data[iCol].COL_NM;


                        var column = grid.getColumnByField(columnName);


                        grid.showHider.show(column.field, 'field');


                    }


                }


                else {


                    for (var iCol = 0; iCol < data.length; iCol++) {


                        var columnName = data[iCol].COL_NM;


                        var column = grid.getColumnByField(columnName);


                        grid.showHider.hide(column.field, 'field');


                    }


                }


            }


        });


    }




//controller


 public ActionResult ColumnChange([FromBody] JObject data)


        {


            string UserEmail = HttpContext.User.FindFirstValue("Email");


            HVACGridColumnModel Model = new HVACGridColumnModel { EMAIL = UserEmail };




            string CheckID = data["CheckID"].ToString();


            switch (CheckID)


            {


                case "checkBD":


                    Model.PSN_ID = "10000";


                    break;


                case "checkWL":


                    Model.PSN_ID = "20000";


                    break;


                case "checkDW":


                    Model.PSN_ID = "30000";


                    break;


                case "checkHD":


                    Model.PSN_ID = "40000";


                    break;


                case "checkFA":


                    Model.PSN_ID = "50000";


                    break;


                case "checkAB":


                    Model.PSN_ID = "60000";


                    break;


                case "checkSL":


                    Model.PSN_ID = "70000";


                    break;


                case "checkPL":


                    Model.PSN_ID = "80000";


                    break;


            }


            List<HVACGridColumnModel> list = HVACGridColumnModel.GetColumnList(Model, "S1");




            return Json(list);


        }


---------------------------------------------------------------


Thank you for your kind reply always.




I'll be waiting for the reply.


Attachment: Question_video_c33b1066.zip

6 Replies

JC Joseph Christ Nithin Issack Syncfusion Team December 17, 2021 12:52 PM UTC

Hi TaeWook, 

   Greetings from Syncfusion support. 

   Based on your requirement you want to show and hide columns in your grid. Your requirement can be achieved using an inbult feature `Column Chooser`, you can enable this by using the `showColumnChooser` property of the EJ2 Grid.  

 
  You can also choose a column not to be shown in the column chooser by disabling the `column.showInColumnChooser` property of the EJ2 Grid. 


  We have already discussed about this in detail in the below documentation. You can get more information about columnchooser in the below documentation. 


  Also you can refer the below sample which demonstrates the columnchooser feature in detail. 


If this is not your requirement? Then please share the following details so that we may be able to provide a better solution ASAP. 

  • Do you want to show and hide the columns externally? If you please explain why you want to do this externally.

Please get back to us for further details. 

Regards, 
Joseph I. 



TK TaeWook Kang December 20, 2021 10:36 AM UTC

I think you misunderstood my question.


So I'll ask you the same question again.


Once again, please watch the video I provided.


 I want you to suggest specific ways to solve the problem.

As shown in the video, the speed is slow when hiding the column.

The point that the same column as the corresponding part cannot be erased when freezing a part of the grid.



I need a solution to these two problems.



I look forward to your definite answer.




JC Joseph Christ Nithin Issack Syncfusion Team December 21, 2021 02:44 PM UTC

Hi TaeWook, 

  Thanks for your update. 

  Currently we are validating your query, we will provide further details on or before 23rd December 2021. We appreciate your patience until then. 

Regards, 
Joseph I. 



JC Joseph Christ Nithin Issack Syncfusion Team December 23, 2021 03:26 PM UTC

Hi TaeWook, 

  Thanks for your patience. 

  We have created a separate ticket under your account. Kindly follow the ticket for further information. 


Regards, 
Joseph I. 



TK TaeWook Kang December 23, 2021 11:36 PM UTC

Hi Syncfusion team,


Thank you for your kind reply all the time.

We solved one of the two problems and left only one problem.


The remaining problem is that the process of hiding multiple columns at the same time is slow.

(Please check the specific problem through the video I provided earlier.)



And it's a question about "ticket" that you answered before.

I can't check the information about the "ticket" provided to my account you mentioned. Please tell us what "ticket" is referring to in your company.


Your company may not understand my question, so you may be thinking of a different way of communicating.

But if I communicate in another way, I don't think your company will understand my requirements more.

(Because I lack English communication skills.)


So if you don't understand anything, I'd appreciate it if you could leave me a detailed description of what you don't understand.


We look forward to your kind reply.

And if the speed problem is a problem that cannot be solved, please answer it with certainty.


Thank you.



SK Sujith Kumar Rajkumar Syncfusion Team December 28, 2021 11:11 AM UTC

Hi TaeWook, 
 
We created a support ticket under your account mainly for privacy and the ticket will be visible only by the account holder. However, we have addressed your query below, 
 
From the provided information we could understand that your query is to hide multiple columns at a time and for that you are using the hide method of the Grid’s showHider. Instead of this approach we suggest you to use the hideColumns and showColumns to show/hide multiple columns at the same time. 
 
This is demonstrated in the below code snippet for your reference, 
 
// Hides the mentioned columns by its field name 
grid.hideColumns(['OrderID', 'CustomerID', 'Freight'], 'field') 
 
// Show the mentioned columns by its field name 
grid.showColumns(['OrderID', 'CustomerID', 'Freight'], 'field') 
 
 
So please use this approach for your requirement and if you are facing problems with this then it would be helpful if you could share us a replication sample or hosted site where this problem is reproduced to validate further. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon