Many of the data aware controls in .NET have a
property that enables this sort of behaviour.
You haven't stated which controls your application is using so I do not know if this will be of any use to you. In case it might be here
] is a link to the relevant page on MSDN for the DataGridView.