We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Hiding rows

Hi, In griddataboundcontrol, Selected rows i have to hide from diaplay. How do i do that..? Send me code sample. grid.Model.RowHeights[rowIndex] = 0; This will work, but i want know how do i capture that selected rowindex. If it is single row ..? Multiple rows how..? Help me...?

1 Reply

AD Administrator Syncfusion Team July 18, 2005 03:57 AM

You use this.gridDataBoundGrid1.Selections.GetSelectedRows to get a GridRangeInfoList object holding any selected rows. Then you can iterate through this collection.
GridRangeInfoList ranges = this.grid.Selections.GetSelectedRows(true, false);
foreach(GridRangeInfo range in ranges)
{
	for(int i = range.Top; i <= range.Bottom; ++i)
	{
		Console.WriteLine("row {0} selected", i);
        }
}	

Loader.
Live Chat Icon For mobile
Up arrow icon