B Bernard Dec 17, 2003 #1 HI, I have a Datagrid with some columns,... anyone knows how can I retrieve the values of the selected row? Thanks,
HI, I have a Datagrid with some columns,... anyone knows how can I retrieve the values of the selected row? Thanks,
D Dmitriy Lapshin [C# / .NET MVP] Dec 17, 2003 #2 Hi Bernard, Look at the code snippet below: CurrencyManager cm = (CurrencyManager)this.BindingContext[ dataGrid.DataSource, dataGrid.DataMember]; DataView view = (DataView)cm.List; string customerName = view[cm.Position]["CustomerName"]
Hi Bernard, Look at the code snippet below: CurrencyManager cm = (CurrencyManager)this.BindingContext[ dataGrid.DataSource, dataGrid.DataMember]; DataView view = (DataView)cm.List; string customerName = view[cm.Position]["CustomerName"]