JS ドロップダウンボックスの既定値を変更

  • 作成者:ayuan0625
  • 編集回数:14次
  • 最終更新:ayuan0625 于 2020-12-23
  • I. Overview

    1.1 Requirement

    The last option in the drop-down box defaults to “Select None”. If you pick this option, data will not be filtered in query, that is to say, all options listed in the drop-down box will be picked. So how to make the last option displayed as “Select All”?

    You will learn
    • Sample

      • Steps

      • Preview

    • Download the template

    II. Sample

    2.1 Steps

    1)Add a Drop-down Box widget to the parameter pane, customize the data dictionary, add options A, B and C, and check [Allow Null].

    The last option in the drop-down list is displayed as “Select None”.

     

    2)Add an After Initialization event to the Drop-down Box widget:

    3.png 

    Input the following JavaScript codes:

    this.options.name4Empty = "Select All";

     

    2.2 Preview

    Save the template and click [Pagination Preview]. The last option in the drop-down list is displayed as “Select All”.

    4.png 

    III. Download the template

    Attachment List


    Theme: FineReport カスタム開発
    既に最初
    既に最後
    • Helpful
    • Not helpful
    • Only read