控制列输入
if stringgrid1.col =3 then
begin
if (ComboBox1.Text='整数')then
begin
if not( key in ['0'..'9',#13,#8] )then
begin
key := #0;
showmessage('Only numeric allowed here!');
end;
end else
if (combobox1.Text ='小数') then
begin
if not( key in ['0'..'9',#13,'.',#8] )then
begin
key := #0;
showmessage('Only numeric and . allowed here!');
end;
end;
end