Home > Back-end >  100 points to further challenge: 500 DBEdit control dynamic condition display parts and correspondin
100 points to further challenge: 500 DBEdit control dynamic condition display parts and correspondin

Time:10-12


You can see here: http://bbs.csdn.net/topics/390519799? Page=1 # post - 395058726

The warrior is good, the above in the form of an Edit control input "wang" will query the relevant field data list, wang jun, by the same token, the query and others, this problem has been solved warrior,
The question is:
Input wang jun, for example, three fields related to "fields to the field 1, 3, 500" all the data has a query, but I'm through DBEdit control entry personnel data, so you need to query DBEdit controls also need like field 1, fields, 3 fields 500 displayed, it will show three DBEdit controls, and the first DBEdit control corresponding "field 1", the second DBEdit control corresponding to the "three fields", third DBEdit control corresponding "field in 500," three DBEdit control after coming out, I can input data,

Basic train of thought is above these, I do not know how to implement the warrior, can't a person a conditional statement, that is too large, it is best as a dynamic query,
In addition, due to the field to 500, using 500 DBEdit controls seems too much, or what is the better way to achieve can, of course, there are ways to better than nothing wow!!!!!!

Thank you very much!

CodePudding user response:

First, according to a field to spell out the SQL table 1 shows to perform again

CodePudding user response:

Don't modify by DBEdit, use DBgrid, must have 500 DBEdit where you put...

CodePudding user response:

Yes, it is the basic function of dbgrid, use dbedit to naturally

CodePudding user response:

LZ was lost

CodePudding user response:

To tell the truth, I am using firemonkey HD, DBGrid no, only StringGrid, many functions, such as the background frame datadraw what of, I would like to achieve in a StringGrid, won't have input data editing, can not change, only in the input data space, but if not achieve them, so, if the lock can't edit, that how to input; How to Edit the data before can change again (I don't want to be changed, if it's not Edit controls, and how to do????? Master action!!!!!!!!!!

CodePudding user response:

Hundreds of field, attempts to do?

CodePudding user response:

reference 5 floor u011443248 reply:
to be honest, I am using firemonkey HD, DBGrid no, only StringGrid, many functions, such as the background frame datadraw what of, I would like to achieve in a StringGrid, won't have input data editing, can not change, only in the input data space, but if not achieve them, so, if the lock can't edit, that how to input; How to Edit the data before can change again (I don't want to be changed, if it's not Edit controls, and how to do????? Master action!!!!!!!!!!


Function of the most basic stringgrid, also can intercept in onkey events, in order to achieve the effect of some cell cannot be input

CodePudding user response:

Create a temporary table to store the query result, again shows that the temporary table,

CodePudding user response:

500 field, DBEdit really unusual, but I got 2 program DBEdit is nearly 400,

CodePudding user response:

Can be used to dynamically create methods to achieve, just thinking, improved by oneself,
With the DBEDIT and relevance to the field,
 
Procedure TForm1. Button1Click (Sender: TObject);
Var
Lables: TLabel;
The Edits: TDBEdit;
I: integer;
The begin
For I:=1 to the self. Adoquery1. FieldCount do begin//create many fields with the same number
Lables:=TLabel. Create (self);//create a TAB and set to the field name
Lables. Top: 30 *=I;
Lables. Left:=10;
Lables. Width:=100;
Lables. Height:=25;
Lables. Parent:=the self;
Lables. Caption:=self. ADOQuery1. Fields [I - 1]. FieldName.
Lables. Name:='lable' + trim (inttostr (I));
Lables. Visible:=true;
The Edits:=TDBEdit. Create (self);//create DBEDIT and associated to the related field
The Edits. Top: 30 *=I;
The Edits. Left:=110;
The edits. Parent:=the self;
The Edits. The DataSource:=self. DataSource1;
The Edits. DataField:=self. ADOQuery1. Fields [I - 1]. FieldName;
Edits the Name:='edit' + trim (inttostr (I));
The Edits. Visible:=true;
end;
end;




CodePudding user response:

Suggest the building still learn database design, database design, interface, another is useless,

CodePudding user response:

Form put too much control of the system also not too good or convenient to dbgrid,
There is a table inside 500 fields optimization should be considered.

CodePudding user response:

If some database have limits on number field
  • Related