Hi Vlad,
Yes, you always bind dataview (a wrapper around DataTable) and not
datatable.
Try with DataRowView.Row to get to the DataRow.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com
"Vlad A." <Vlad A.@discussions.microsoft.com> wrote in message
news:F450C972-C036-4233-AD4E-(E-Mail Removed)...
> Hello.
> For simplicity sake, I wanted to use a dataset as my business object, but
> because I needed to implement a lot of business logic, I've just derived
> my
> classes from the typed dataset (and datatable and datarow using ADO.NET
> Dataset builder by Shawn Wildermuth).
> Everything works great, but after binding my objects to a datagrid, I need
> to change some small things for each row in the grid, so I'm implementing
> Datagrid's OnItemCommand delegate which returns me DataItem inside the
> e.Item.
> The thing is, for some unknown to me reason, the DataItem is of type
> DataRowView, and I can't cast it neither to my object nor to DataRow.
> What can I do? How can I get the original object it was bound (at least I
> think it was) to?
> Thanks in advance.