C# - dataGrid problems

Discussion in 'OT Technology' started by dexedrine, Jun 17, 2003.

  1. dexedrine

    dexedrine Guest

    I'm trying to make a datagrid control that data can be added, edited, deleted etc. Right now everything works except one thing. If I add 20 records, and I want to delete the last item, it won't let me.

    The dataGrid is populated by a DataTable from a SqlDataAdapter. The deleting and editing commands for the datagrid are automatically from the SqlCommandBuilder.

    So right now if I enter the following:

    It looks like

    If I refresh the dataSource of the datagrid, the id's show up and then can be deleted. The id is automatically generated on the Sql server.

    I dunno, let me know if anybody has any suggestions.

Share This Page