让dbgrid和dbnavigator连接同一个datasource
不做任何处理时,点击+号是在当前光标的前一个位置加入一条记录
我想实现在点击一下navegator上的+时在dbgrid的最后添加一条记录;
需要怎么处理?

解决方案 »

  1.   

    这个应该办不到的,因为:nserts a new, empty record in the dataset.procedure Insert;DescriptionCall Insert to:1 Open a new, empty record in the dataset.
    2 Set the active record to the new record.After a call to Insert, an application can enable users to enter data in the fields of the record, and then post those changes to the database using Post (or ApplyUpdates if cached updating is enabled). A newly inserted record is posted to the database in one of three ways:For Paradox tables with primary indexes, the record is inserted into the dataset in a position based on its index.
    For Paradox tables without primary indexes, the record is inserted into the dataset at the current cursor position.
    For dBASE, FoxPro, and Access tables, the record is physically appended to the dataset at the end. If an index happens to be active, the new record may appear in a position relative to the index, but the record is still actually stored at the end of the table.For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.其实,这样做有什么意义吗?