Re: Datagridview

Tech-Archive recommends: Fix windows errors by optimizing your registry



You're confusing a DataGridViewRow with the underlying data source. A
DataGridViewRow does not have any such properties. A System.Data.DataRow
does. But you need to confirm to us that your DataGridView is bound to a
table first. If so, the DataGridViewRow has a "DataBoundItem" property which
is of type "object." If it is bound to a DataTable, the DataBoundItem
property will be a DataRowView (most likely). A DataRowView has a "Row"
property which is the underlying DataRow. And *that* has a RowState
property.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"Philipp" <styxke@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uLAkPCdfGHA.3652@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,

Is there a way to retrieve the rowstate of a row in a datagridview
(added - modified - deleted - ...) ?
Does someone have some info on this or a document/url where I can read
about it?

Thanks in advance!

Philipp


.



Relevant Pages

  • Re: Datagridview
    ... Kevin Spencer wrote: ... DataGridViewRow does not have any such properties. ... If it is bound to a DataTable, the DataBoundItem property will be a DataRowView. ...
    (microsoft.public.dotnet.framework)
  • Re:Mapping from DataGridView to the actual DataRow
    ... On a DataGridViewRow is a property called DataBoundItem of type object. ... This will contain a DataRowView ...
    (microsoft.public.dotnet.framework.windowsforms)