Home > Back-end >  To ask how to dynamically switch the master-slave attribute from the table in the table?
To ask how to dynamically switch the master-slave attribute from the table in the table?

Time:10-05

I think at run time, give a ping-pong button, switch dynamic display, hide the main table dbgrid, from the table to show all the data at the same time, the associated data or display;

But the following code to run down, after remove the dependency, data does not show all

Beg shameless!!!!!!


If (dbgridMaster - & gt; The Visible) {
DbgridMaster - & gt; The Visible=false;
DsetSlaveSummary - & gt; Active=false;
DsetSlaveSummary - & gt; MasterSource=NULL;
DsetSlaveSummary - & gt; MasterFields="";
DsetSlaveSummary - & gt; IndexFieldNames="";
DsetSlaveSummary - & gt; PacketRecords=1;
DsetSlaveSummary - & gt; Active=true;
} else {
DsetSlaveSummary - & gt; Active=false;
DsetSlaveSummary - & gt; MasterSource=dsrcMasterSummary;
DsetSlaveSummary - & gt; MasterFields="project_id";
DsetSlaveSummary - & gt; IndexFieldNames="project_id";
DsetSlaveSummary - & gt; PacketRecords=0;
DsetSlaveSummary - & gt; Active=true;
DsetSlaveSummary - & gt; The Refresh ();
DbgridMaster - & gt; The Visible=true;
}

CodePudding user response:

Well, 0 to 1, rely on

CodePudding user response:

Direct table Settings and can be from a table of the visible attribute

CodePudding user response:

Directly with the true and false, using 0 and 1 is a little bit
  • Related