Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ユーザーがグリッド内の行をクリックする時に実行するJavaScriptコード。このコードは、Clickイベントに関して追加情報を提供する、次のような2つの変数を受け取ります。

  • event - Clickイベントのブラウザ・イベント・オブジェクト。
  • rowNum – クリックされた行番号。これは作業リスト内の行数で、グリッド内の行数(これはユーザーのソートにより変更される可能性があります。)ではありません。

このコードからfalseを返すことで、行が選択されないようにすることができます。

デフォルト値

ブランク

有効値

有効なJavaScriptコード

次の例では、クリックされた行で警告を表示し、行番号3が選択されないようにします。

JavaScript code to be run when the user clicks on a row in the grid. The code receives two variables that provide extra information about the click event:

event – The browser Event object for the click event.

rowNum – the number of the row clicked on. This will be the number of the row in the working list, not the row within the grid (which may change with user sorting).

You can prevent the row being selected by returning false from this code.

Default value

Blank

Valid values

Any valid JavaScript code

Example

The following will display an alert indicating the row clicked, and prevent row 3 from being selected:

alert("Row " + rowNum); return (rowNum != 3);