1 (edited by nitin.ingale08 2017-08-21 12:08:56)

Topic: clear button script get show

Sir.

at Clear clear button script get show to clear checkbox and how to link checkbox with combobox so they can work wise-versa .

please see attach project,

https://www.dropbox.com/s/f5mak4jt73jp6 … P.rar?dl=0

please delete data from backup folder while resend project file.


Regrads
Nitin Ingale

Re: clear button script get show

Unfortunately I can't understand your question.

Dmitry.

Re: clear button script get show

Sir,

I am using scheduling table, which is a temparary, when student course get complite, we delete students data.
Now the row is free to allocate new students at particular row.

Please download attached project, go to temporary scheduling tab. In that, days+batch time + PCNO rows are created. (Total  636 row, means 636 student can train in a day.

I had created a clear button, at scheduling form,  to delete student data and allocate new student. That student data is copying from deliverable student database.

Please check clear button, when I click clear button to delete student data, then day checkbox and memo need more time to clear data.

Please check, any think wrong in script, why it's take time to clear data for checkbox and memo.

Also

I have created checkbox, those operate the combo box. Because  checkbox don't have "or" command. We cannot search with checkbox.

This checkbox are not working as wise versa. When I see other row then checkbox is not updated as data save in combo box.

How we can write the script which link checkbox us combo box,

Regards
Nitin ingale

Re: clear button script get show

Sir,

I have created checkbox, those operate the combo box. Because  checkbox don't have "or" command. We cannot search with checkbox.

But, When I see other row to edit,   then checkbox is not updated as data save in combo box.

For that I am using this script to update checkbox,
but its give error,
Please fix the error. 

procedure Scheduling_OnShow (Sender: string; Action: string);
begin
      if Scheduling.combobox9.dbitemid := 1 then Scheduling.CheckBox1.Checked = False else Scheduling.CheckBox1.Checked = true;
      if Scheduling.combobox10.dbitemid := 1 then Scheduling.CheckBox2.Checked = False else Scheduling.CheckBox2.Checked = true;
      if Scheduling.combobox11.dbitemid := 1 then Scheduling.CheckBox3.Checked = False else Scheduling.CheckBox3.Checked = true;
      if Scheduling.combobox12.dbitemid := 1 then Scheduling.CheckBox4.Checked = False else Scheduling.CheckBox4.Checked = true;
      if Scheduling.combobox13.dbitemid := 1 then Scheduling.CheckBox5.Checked = False else Scheduling.CheckBox5.Checked = true;
      if Scheduling.combobox14.dbitemid := 1 then Scheduling.CheckBox6.Checked = False else Scheduling.CheckBox6.Checked = true;
      if Scheduling.combobox15.dbitemid := 1 then Scheduling.CheckBox7.Checked = False else Scheduling.CheckBox7.Checked = true;
end;

Regards
Nitin Ingale

Re: clear button script get show

Hi Nitin,
I believe the correct syntax is:
      if Scheduling.combobox9.dbitemid = 1 then Scheduling.CheckBox1.Checked := False else Scheduling.CheckBox1.Checked := true;
etc, etc.
Regards,
Derek.

Re: clear button script get show

Thanks Sir,

Can you please check scheduling form in that....

Please check clear button, when I click clear button to delete student data, then day checkbox and memo need more time to clear data.

Go to - Temporary Batch Scheduling button + edit row and press clear button of Scheduling form ...

you will see, day checkbox and memo need more time to clear (uncheck and memo.)

any think wrong in script, why it's take time to clear data for checkbox and memo.

Regards
Nitin Ingale

Re: clear button script get show

Sir,

The script is as......

procedure Scheduling_Button3_OnClick (Sender: string; var Cancel: boolean);
begin
      Scheduling.CheckBox1.Checked := False;
      Scheduling.CheckBox2.Checked := False;
      Scheduling.CheckBox3.Checked := False;
      Scheduling.CheckBox4.Checked := False;
      Scheduling.CheckBox5.Checked := False;
      Scheduling.CheckBox6.Checked := False;
      Scheduling.CheckBox7.Checked := False;
      Scheduling.ComboBox4.Clear;
      Scheduling.ComboBox5.Clear;
      Scheduling.ComboBox6.Clear;
      Scheduling.ComboBox7.Clear;
      Scheduling.ComboBox8.Clear;
      Scheduling.ComboBox9.Clear;
      Scheduling.ComboBox10.Clear;
      Scheduling.ComboBox11.Clear;
      Scheduling.ComboBox12.Clear;
      Scheduling.ComboBox13.Clear;
      Scheduling.ComboBox14.Clear;
      Scheduling.ComboBox15.Clear;
      Scheduling.Memo1.Clear;
      Scheduling.ComboBox4.dbupdate;
      Scheduling.ComboBox5.dbupdate;
      Scheduling.ComboBox6.dbupdate;
      Scheduling.ComboBox7.dbupdate;
      Scheduling.ComboBox8.dbupdate;
      Scheduling.ComboBox9.dbupdate;
      Scheduling.ComboBox10.dbupdate;
      Scheduling.ComboBox11.dbupdate;
      Scheduling.ComboBox12.dbupdate;
      Scheduling.ComboBox13.dbupdate;
      Scheduling.ComboBox14.dbupdate;
      Scheduling.ComboBox15.dbupdate;
end;

Regards

Nitin Ingale