1 (edited by ms2014m 2024-02-09 02:44:08)

Topic: hide filelds

Hello my friends
I have an idea and don't know how to implement it

Attached is a sample for a simple explanation.When you choose to hide all OK, it hides all data that contains OK in the order column

Post's attachments

Attachment icon Hide order.rar 294.12 kb, 21 downloads since 2024-02-09 

Re: hide filelds

If, as in your example, you only have two order statuses ('waiting' and 'ok'') then wouldn't it be easier to just add a boolean field to table 'aaaa' rather than use a related table 'xxxx'.  That said, in my opinion, there are issues for the end-user using boolean fields (centred around the 'allowgrayed' condition and the fact that the 'checkbox cannot be resized and so making it rather awkward in use.
Another approach would be to use a combobox instead of a check box (I was a bit puzzled that you already use a combobox on Form2 but then choose to use a checkbox on Form1). 
Personally, I find comboboxes a better option because
1.  more user friendly
2.  in the tablegrid, you can display the actual combobox value rather than 'yes' or 'no' (as is the case with booleans)
3.  if you need to add new options (not just 'waiting' and 'ok') then it can be done without any re-working of the program.
4.  if you use the multi-select option with the combobox, you have complete flexibility as to what combination of options you want to include / exclude when filtering.
Both the 'boolean' approach and the 'combobox' approach are in the attachment.
Of course, there are other possibilities as well but these would probably involve some script.
Hope this helps,

Post's attachments

Attachment icon hide orders.zip 676.58 kb, 24 downloads since 2024-02-09