>Hi,
>
>I have a button on my form captioned "Add New". When user clicks on this button a new row should be added to the dataset and the controls (e.g. textboxes) of the form should show this new row.
>
>Here is what I did:
>
>
>btnAddNew_click()
>{
> oMyDataSet.dtMyTable.Rows.Add();
>
> bindingSource1.MoveLast();
> }
>
>
>The above seem to add a new row to the data set but the "pointer" not moving there.
>
>However, in my GoToLast button by calling:
>
>bindingSource1.MoveLast();
>
>the pointer does go to the last row.
>
>What am I missing?
You need to create a row to be added:
DataRow r = oMyDataSet.dtMyTable.NewRow()
oMyDataSet.dtMyTable.Rows.Add(r);