更新了表格列设置的问题
This commit is contained in:
parent
d74dbaaa9f
commit
9f38a6e3ac
|
@ -558,6 +558,11 @@ end;
|
|||
begin
|
||||
mcatpion:=StringReplace(mcatpion,'[COLOR=#FF0000]*[/COLOR]','',[rfIgnoreCase]);
|
||||
ShowMessage('【'+mcatpion+'】,数据不能为空!');
|
||||
// ÉèÖý¹µã
|
||||
if (TdxLayoutItem(dxLayoutControl1.Items[i]).Control is TWinControl) then
|
||||
begin
|
||||
TWinControl(TdxLayoutItem(dxLayoutControl1.Items[i]).Control).SetFocus;
|
||||
end;
|
||||
exit ;
|
||||
end;
|
||||
end;
|
||||
|
@ -597,6 +602,11 @@ begin
|
|||
begin
|
||||
mcatpion:=StringReplace(mcatpion,'[COLOR=#FF0000]*[/COLOR]','',[rfIgnoreCase]);
|
||||
ShowMessage('【'+mcatpion+'】,数据不能为空!');
|
||||
|
||||
if (TdxLayoutItem(dxLayoutGroup.Items[i]).Control is TWinControl) then
|
||||
begin
|
||||
TWinControl(TdxLayoutItem(dxLayoutGroup.Items[i]).Control).SetFocus;
|
||||
end;
|
||||
exit ;
|
||||
end;
|
||||
end;
|
||||
|
|
|
@ -32,8 +32,7 @@ procedure ShowCxGridDesign(application: TApplication;
|
|||
function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;
|
||||
mFlag: integer): Boolean;
|
||||
// stdcall;external 'rtCommon.dll' Name 'checkColumnMustIn_A';
|
||||
function checkColumnMustIn_A(app: TApplication; tv1: TcxGridDBTableView;
|
||||
client1: TClientDataSet; mFlag: integer): Boolean;
|
||||
function checkColumnMustIn_A(app: TApplication; tv1: TcxGridDBTableView;client1: TClientDataSet; mFlag: integer): Boolean;
|
||||
procedure getColumnRelation(tv1: TcxGridDBTableView; client1: TClientDataSet);
|
||||
function SaveGridSetInfoToBase(mCxGridView: TcxGridDBTableView; client1:TClientDataSet;
|
||||
ADOCmd: TADOQuery; designCode: string): Boolean;
|
||||
|
@ -473,8 +472,7 @@ end;
|
|||
// end;
|
||||
|
||||
//
|
||||
function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;
|
||||
mFlag: integer): Boolean;
|
||||
function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;mFlag: integer): Boolean;
|
||||
var
|
||||
i: integer;
|
||||
client1: TClientDataSet;
|
||||
|
@ -520,25 +518,38 @@ end;
|
|||
mfieldName:string;
|
||||
begin
|
||||
result:=false;
|
||||
for i := 0 to tv1.ColumnCount-1 do
|
||||
begin
|
||||
// ADBColumn :=TcxGridDBColumn( tv1.Columns[i] );
|
||||
if tv1.Columns[i].Tag = mFlag then
|
||||
try
|
||||
tv1.DataController.DataSet.DisableControls;
|
||||
for i := 0 to tv1.ColumnCount-1 do
|
||||
begin
|
||||
with tv1.DataController.DataSet do //
|
||||
begin
|
||||
if not client1.Locate('caption',tv1.Columns[i].Caption,[]) then Continue;
|
||||
if tv1.Columns[i].DataBinding.Field.DataType<>ftString then Continue ;
|
||||
mfieldName :=trim( client1.FieldByName('fieldName').AsString);
|
||||
if locate( mfieldName, null, []) or locate( mfieldName, '', []) then
|
||||
begin
|
||||
Application.MessageBox(PChar(tv1.Columns[i].Caption + '²»ÄÜΪ¿Õ!'), 'Ìáʾ', 0);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
if tv1.Columns[i].Tag = mFlag then
|
||||
begin
|
||||
with tv1.DataController.DataSet do //
|
||||
begin
|
||||
// if not client1.Locate('caption',tv1.Columns[i].Caption,[]) then Continue;
|
||||
// if tv1.Columns[i].DataBinding.Field.DataType<>ftString then Continue ;
|
||||
mfieldName :=trim(tv1.Columns[i].DataBinding.FieldName);
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if trim(FieldByName(mfieldName).AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox(pchar('¡¾'+PChar(tv1.Columns[i].Caption + '¡¿²»ÄÜΪ¿Õ!')), 'Ìáʾ', 0);
|
||||
|
||||
// tv1.Controller.FocusedRowIndex := 0;
|
||||
// tv1.Controller.FocusedColumn:=tv1.Columns[i] ;
|
||||
// tv1.Controller.MakeFocusedItemVisible ;
|
||||
exit;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
result:=true;
|
||||
finally
|
||||
tv1.DataController.DataSet.EnableControls ;
|
||||
end;
|
||||
result:=true;
|
||||
end;
|
||||
|
||||
///////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue
Block a user