Home All Groups Group Topic Archive Search About

DataTable.Row[i].EndEdit()

Author
31 Mar 2005 5:24 PM
Antonio Budano
Hi,
How can I know which row is currently being editing when I have some
controls bound to a DataSet.DataTable in order to call the EndEdit method
prior to update data to the database?
Is there any CurrentRecord indexer?
When I call Rows.Add metod, the row I am adding will be put at the end?

Sorry for these stupid questions but I am newer on .net and ado.

Thanks
Antonio

Author
3 Apr 2005 6:15 AM
Bonnie Berent [C# MVP]
Antonio,

When your controls are bound to a DataTable, you can find the index of the
current row by using

this.BindingContext[MyTable].Position;

Yes, when adding a new row, it always goes at the end.

And, no, your questions are not stupid. =)

~~Bonnie


Show quote
"Antonio Budano" wrote:

> Hi,
> How can I know which row is currently being editing when I have some
> controls bound to a DataSet.DataTable in order to call the EndEdit method
> prior to update data to the database?
> Is there any CurrentRecord indexer?
> When I call Rows.Add metod, the row I am adding will be put at the end?
>
> Sorry for these stupid questions but I am newer on .net and ado.
>
> Thanks
> Antonio
>
>
>

AddThis Social Bookmark Button