hi,
i need help, how can i get the value from a particular dgvcell if i'll select the entire dgvrow and how to auto-select a row
hi,
i need help, how can i get the value from a particular dgvcell if i'll select the entire dgvrow and how to auto-select a row
datagridview / cells and rows
Ray Angeles
Try:
Might want to try checking for nulls
RJ
mark the answer
Ali Gullen
newTempProductRow = (
product_dbDataSetComp.Tbl_HW_ProductsRow) this.tblHwCompProductsBindingSource.Current;something like that im a bit lost at the min....
Ahmed_khemiri
Hi, am trying to do the same thing, where im pulling some info from within a record. am using the binding source.current to get the obj. but im getting stuck on how to cast to a dataTableRow.
Can anyone help me
Thanks.
SilentAcorn
peter_griffin
oh yeah. . .
if your grid is bound to a binding source which is inturn bound to an IList, at any given time, BindingSource.Position will return the index of the currently selected item in your IList
BindingSource.Current gives the actual selected item though you will have to cast it to the particular item. if your ilist is a Dataable, you will need to cast it to a DataTableRow
Alfy
thats brilliant got it working now.
super fast reply.
Thanks!
Chequer
HighDesert_NM
it may be a DataRowView.
not in a place i can check, but put a breakpoint there and inspect it using a watch. it will tell you what class it is.