Sergio,
ADO.NET handles position in a DataTable with a different concept than VFP. The .Position property is a property of both the BindingContext and the CurrencyManager. In order to position the grid on the last record you just added, you have to set this .Position property.
DataGridViews may handle it differently than the old DataGrid (I haven't time this morning to look into it more thoroughly), but for now, the way I would have done it with the old DataGrid will work just fine:
CurrencyManager cm = (CurrencyManager)this.BindingContext[this.MyGrid.DataSource];
cm.Position = ((DataTable)this.MyGrid.DataSource).Rows.Count - 1;
Once you do that, the Grid will be positioned on that row.
You can also directly set the BindingContext's .Position property directly without having to create a CurrencyManager.
this.BindingContext[this.MyGrid.DataSource].Position = ((DataTable)this.MyGrid.DataSource).Rows.Count - 1;
~~Bonnie
>I have a datagridview bound to a dataset.
>I have inserted a new row in my dataset and I would like to go to the bottom of my dataset in order for my datagridview to see the latest inserted record.
>
>How do I go to the bottom of my dataset. In foxpro I would use :
>
>GO BOTTOM
>
>
>How do you do it in Dataset???
>
>Thanks