WinForm中DataGridView获取当前行绑定数据扩展
public static T GetCurrentRowObject<T>(this DataGridView dv)
{
CurrencyManager cm = (CurrencyManager)dv.BindingContext[dv.DataSource];
return (T)cm.Current;
}
public static T GetCurrentRowObject<T>(this DataGridView dv)
{
CurrencyManager cm = (CurrencyManager)dv.BindingContext[dv.DataSource];
return (T)cm.Current;
}