In my previous post I created a simple ListObject on a WorkSheet. But what if you wanted to know when the user selected a certain row? Could you use the events built into the ListObject to accomplish this? Yes. But those are difficult to use, I think. Instead, let's use the CurrencyManager which is nestled in the DataSource of the ListObject. Just watch:
// handle selection
System.Windows.Forms.CurrencyManager _CurrencyManager;
_CurrencyManager = _ListObject.BindingContext[_Source]
as System.Windows.Forms.CurrencyManager;
_CurrencyManager.CurrentChanged += delegate(object xsender, EventArgs xe)
{
// the selected record is in:
// (_CurrencyManager.Current as Database.Employee).EmployeeID;
};