I'm trying to copy the contents of a DataRow from a typed dataset to a new
datarow using this code:

int pkid = Convert.ToInt32( EmpGrid[selectedRow, 0] );

EmployeesData.EmployeesRow newRow =
(EmployeesData.EmployeesRow)_empData.Employees.FindByPKID( pkid );

// update that rows values
newRow.Firstname = FirstnameText.Text

When the code hits the assignment to newRow.Firstname, I get an Object
reference not set to an instance of an object error.

The value of pkid is correct, as I can see the keys in a datagrid.

Anyone tell me what I'm doing wrong when trying to use that feature of typed
datasets?

Ron

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to