你仔细查看一下帮助,
看看DBGrid的属性..........
看看DBGrid的属性..........
解决方案 »
- cxgrid的过滤器过滤0值问题
- 各位大侠帮帮忙!如何使 RadioGroup 中的几个选项,哪个被选中时就改变颜色。
- DCOM如何跨route和跨网域?
- 请高手帮忙,radiogroup怎么用???
- 一个关于PAGECONTROL超级简单的问题,供大家娱乐
- 请教:文件处理的速度
- 在intranet中用“共享”的方式copy和用ftp方式的copy有什么不同,速度有多少差异,请大家发表各自见解。
- ················zSWANg(伴水)(* pascal→c *) 还有你一百分呢 务必笑纳 ^^ ···········
- 请问,那里有SQL2000下载?
- 如何使 form中的文字自动向上滚动??
- 谁要是能将此小程序补全了,高分啊!(千山一刀求教C语言的)
- 大家开心我高兴!
具体怎么作,我也不太记得了.
我现在需解决的是:
按回车追加一条记录,这跟dbgrid的属性有关吗?
BEGIN
ADODATASET1.APPEND;
END;
Shift: TShiftState);
var
I: Integer;
begin
case Key of
VK_RETURN: begin
I := TDBGrid(Sender).SelectedIndex;
if I + 1 < TDBGrid(Sender).Columns.Count then
Inc(I)
else I := 0;
while (I <> TDBGrid(Sender).SelectedIndex)
and (not TDBGrid(Sender).Columns[I].Visible) do begin
if I + 1 < TDBGrid(Sender).Columns.Count then
Inc(I)
else I := 0;
end;
if (I <= TDBGrid(Sender).SelectedIndex) and
Assigned(TDBGrid(Sender).DataSource) and
Assigned(TDBGrid(Sender).DataSource.DataSet) then
TDBGrid(Sender).DataSource.DataSet.Next;
TDBGrid(Sender).SelectedIndex := I;
end;
end;
end;