unit Un_DBGridEditor;
interface
uses
SysUtils,db,grids,dbgrids;
procedure ShowGridEditor(AGrid:TDBGrid);
implementation
uses
Un_frmDBGridEditDate,Un_frmDBGridEditNum;
procedure ShowGridEditor(AGrid:TDBGrid);
begin
if Assigned(AGrid)and Assigned(AGrid.DataSource)and Assigned(AGrid.DataSource.DataSet) then
case AGrid.SelectedField.DataType of
ftSmallint,
ftInteger,
ftWord,
ftFloat,
ftCurrency,
ftLargeInt : ShowCalc(AGrid);
ftDate,
ftTime,
ftDateTime : ShowDateEditor(AGrid);
else
Raise Exception.Create('ShowGridEditor:Необрабатываемый тип поля');
end
else Raise Exception.Create('ShowGridEditor:Неправильный параметр');
end;
end.
Сайт управляется системой
uCoz