Thursday, February 4, 2010

FormDataSource.object method

There is a nice way to change a property for all controls on a form that are bound to the same field, for example, hide\unhide or enable\disable. FormDataSource has method object() which accepts field number as parameter and returns an object of type FormDataObject which has several properties to change controls' behavior, like visible(), enabled(), allowEdit() and others.
Example:
inventBatch_ds.object(fieldnum(InventBatch, ItemId)).visible(false);
This way to change controls' properties is more preferable than working with individual controls, since it's possible that user will add new controls for the same field using user setup.

2 comments:

  1. Thanks for the information, this is very useful. Allow me to share a health article here, which gods are beneficial to us. Thank you :)

    Cara Mengobati Angina Pektoris (angin duduk)
    Obat Kista Ganglion Alami
    Obat Penghancur Tumor

    ReplyDelete
  2. Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. Explore all kinds of users, hashtags and locations in ease with our Instagram Web Viewer Pictame2.

    ReplyDelete