将你的dbgrid的readonly属性设为true可以禁止插入记录。
第二个问题你可以在dbgrid的onkeypress事件中加入判断代码如下:(cb中的delphi应该差不多)
if(Key==VK_DOWN)
{
if(DataSource1->Dataset->Eof)
{
Key=0;
}
}
第二个问题你可以在dbgrid的onkeypress事件中加入判断代码如下:(cb中的delphi应该差不多)
if(Key==VK_DOWN)
{
if(DataSource1->Dataset->Eof)
{
Key=0;
}
}
DBNavigator1的VisibleButtons中的nbinsert设为false;
DBNavigator1的VisibleButtons中的nbinsert设为false;