Hi Swetaketu,
Thanks for your interest in Syncfusion products.
We have analyzed your scenario and created the simple sample as per your requirement. In order to hide/unhide the records of grid, AddRange/Remove methods of RowHiddenEntries can be used. Please make use of the below code,
Code example:
void chk_hide_CheckStateChanged(object sender, EventArgs e)
{
GridRowHidden[] hiddenrows;
if (chk_hide.Checked)
{
int n = this.gridGroupingControl1.Table.SelectedRecords.Count;
int rowIndex;
hiddenrows = new GridRowHidden[n];
for (int i = 0; i < n; i++)
{
rowIndex = this.gridGroupingControl1.Table.SelectedRecords[i].Record.GetRowIndex();
hiddenrows[i] = new GridRowHidden(rowIndex);
}
//Hide the selected rows.
this.gridGroupingControl1.TableControl.Model.RowHiddenEntries.AddRange(hiddenrows);
}
else
{
//Unhide the selected rows.
while (this.gridGroupingControl1.TableControl.Model.RowHiddenEntries.Count > 0)
{
this.gridGroupingControl1.TableControl.Model.RowHiddenEntries.Remove(this.gridGroupingControl1.TableControl.Model.RowHiddenEntries[0]);
}
}
}
Sample link:
Please refer the below KB for further references,
Regards,
Piruthiviraj