1

列フィルターを含むグリッドを持つ struts2-jquery jqGrid ページがあります。一部の列は表示したくない日付形式であるため、.hide() を使用してその列フィルターの入力フィールドを削除しました。

$("#gs_fraudEndDt").hide();

ただし、非表示にしたフィールドの横にまだ小さな「x」があります。以下は、列フィールドを表示するための html です。

<th class="ui-state-default ui-th-column ui-th-ltr" role="columnheader">
  <div style="position:relative;height:100%;padding-right:0.3em;padding-left:0.3em;">
     <table class="ui-search-table" cellspacing="0">
     <tbody>
       <tr>
          <td class="ui-search-oper" colindex="8" style="display: none;"></td>
          <td class="ui-search-input">
             <input id="gs_fraudEndDt" type="text" value="" name="fraudEndDt" style="width: 100%; padding: 0px; display: none;" disabled="">
          </td>
          <td class="ui-search-clear">
             <a class="clearsearchclass" style="padding-right: 0.3em;padding-left: 0.3em;" title="Clear Search Value">x</a>
          </td>
        </tr>
     </tbody>
  </table>

class="clearsearchclass" の td タグが複数あるため、この特定の列を指定するには、colindex=8 (数行上の td タグから) を選択する必要があります。

この特定の td タグを取得するために使用する必要があるセレクターは何ですか? または、個々のフィルターと「x」を非表示にするより良い方法はありますか?

助けてくれてありがとう

4

1 に答える 1

3

One can specify searchoptions: {clearSearch: false} in colModel for the specific column. It removes the x button from the filter bar for the corresponding column. I suppose that you should specify the option like any other search option inside of <sjg:gridColumn> (see the documentation).

于 2015-06-16T13:41:59.020 に答える