@bobnoordam

Category: Winforms

Store and restore the currently selected cell on a datagridview

The standard .NET datagridview has several properties for active selections, but storing and restoring the current location of the user in the grid can be surprisingly un-intuitive. While you can use the SelectedRows propertie to query active selections, re-activating these selections in the rows[] collection, this will not restore focus to the row that was active before your event. The most effective way to archive this is querying the active cell before your event, and […]