Home > Back-end >  For urgent urgent urgent! In a condition to do after all
For urgent urgent urgent! In a condition to do after all

Time:10-04


Was above this, click on the left side of the selection, and all future generations can choose button
Now according to the province after coding group, for example, in the capture click + number, click on the image below
Selection button, box under the number + choices all
Consult dephi great god, and give an idea what to do, or to the code, 3 QQQQQQQQ

CodePudding user response:

Using tcxGrid controls

CodePudding user response:

The first selection is the whole table traversal and selected junior.
The second selection positioning to the selected group first, and then select the lower.


CodePudding user response:

refer to the second floor simonhehe response:
is the first selection the whole table traversal and selected junior.
The second selection positioning to the selected group first, and then select the lower.


The dephi is not very good, the great god could simply write down the code please consult

CodePudding user response:

refer to the second floor simonhehe response:
is the first selection the whole table traversal and selected junior.
The second selection positioning to the selected group first, and then select the lower.

I do this is the first selection button
Procedure TfrmFymxsh. Cb_select_allPropertiesEditValueChanged (
Sender: TObject);
The begin
Inherited;
If cds_mxlb. RecordCount=0 then
Cb_select_all. Checked:=false;
Cds_mxlb. DisableControls;
If cb_select_all. Checked then//all
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=true;
Cds_mxlb. Post;
Cds_mxlb. Next;
end;
End
All else//don't choose
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=false;
Cds_mxlb. Post;
Cds_mxlb. Next;
end;
end;
Cds_mxlb. EnableControls;
Cds_mxlb. First;
end;

CodePudding user response:

The warrior help ah

CodePudding user response:

You can make a judgment, here are your code

 procedure TfrmFymxsh. Cb_select_allPropertiesEditValueChanged (
Sender: TObject);
The begin
Inherited;
If cds_mxlb. RecordCount=0 then
Cb_select_all. Checked:=false;
Cds_mxlb. DisableControls;
If cb_select_all. Checked then//all
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=true;
Cds_mxlb. Post;
Cds_mxlb. Next;
end;
End
The else
If cb_select_Curr. Checked then//selected current
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
//if the obvious region coding is equal to the currently selected group coding in the table, select
If cds_mxlb. FieldByName (' DQBM) AsString='aaa' then
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=true;
Cds_mxlb. Post;
end;
Cds_mxlb. Next;
end;
End
All else//don't choose
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=false;
Cds_mxlb. Post;
Cds_mxlb. Next;
end;
end;
Cds_mxlb. EnableControls;
Cds_mxlb. First;
end;

CodePudding user response:

My idea is: click the selection button, cancel all options, first traversal of the group again, finally choose a set of data lines

CodePudding user response:

refer to 6th floor simonhehe response:
can make a judgment, here's your code

 procedure TfrmFymxsh. Cb_select_allPropertiesEditValueChanged (
Sender: TObject);
The begin
Inherited;
If cds_mxlb. RecordCount=0 then
Cb_select_all. Checked:=false;
Cds_mxlb. DisableControls;
If cb_select_all. Checked then//all
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=true;
Cds_mxlb. Post;
Cds_mxlb. Next;
end;
End
The else
If cb_select_Curr. Checked then//selected current
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
//if the obvious region coding is equal to the currently selected group coding in the table, select
If cds_mxlb. FieldByName (' DQBM) AsString='aaa' then
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=true;
Cds_mxlb. Post;
end;
Cds_mxlb. Next;
end;
End
All else//don't choose
The begin
Cds_mxlb. First;
While not cds_mxlb. Eof do
The begin
Cds_mxlb. Edit;
Cds_mxlb. FieldByName (' select '). AsBoolean:=false;
Cds_mxlb. Post;
Cds_mxlb. Next;
end;
end;
Cds_mxlb. EnableControls;
Cds_mxlb. First;
end;


If cds_mxlb. FieldByName (' DQBM) AsString='aaa' then what is the meaning of this paragraph, what is aaa

CodePudding user response:

refer to the second floor simonhehe response:
is the first selection the whole table traversal and selected junior.
The second selection positioning to the selected group first, and then select the lower.


nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related