laks123

laks123

  • NA
  • 2
  • 0

currency manager - help

Feb 16 2004 3:33 PM
I'm getting an error in runtime - "Invalid Cast" When I cast the cm.List to dataview as the list returns a dataviewmanager ================ CurrencyManager cm = (CurrencyManager)BindingContext[dgUsers.DataSource]; DataView dv = (DataView) cm.List; DataRow dr = dv[cm.Position].Row; ============== so I did this, but still have problems. ================ CurrencyManager cm = (CurrencyManager)BindingContext[dgUsers.DataSource]; DataViewManager dvm = (DataViewManager)cm.List; DataView dv = (DataView)dvm.CreateDataView(dsAllUsers.Tables[0]); DataRow dr = dv[cm.Position].Row; ============= The goal is when a double click occurs on a datagrid (or ultragrid), get an handle on that row. Thanks