Groups | Blog | Home
all groups > dotnet ado.net > march 2005 >

dotnet ado.net : DataTable.Row[i].EndEdit()



Antonio Budano
3/31/2005 7:24:43 PM
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

Bonnie Berent [C# MVP]
4/2/2005 10:15:02 PM
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


[quoted text, click to view]
AddThis Social Bookmark Button